#include "services/metrics/public/cpp/ukm_source.h"
#include <utility>
#include "base/atomicops.h"
#include "base/check_op.h"
#include "base/hash/hash.h"
#include "base/notreached.h"
#include "services/metrics/public/cpp/ukm_source_id.h"
#include "third_party/metrics_proto/ukm/source.pb.h"
namespace ukm {
namespace {
constexpr int kMaxURLLength = …;
constexpr char kMaxUrlLengthMessage[] = …;
int32_t g_android_activity_type_state = …;
std::string GetShortenedURL(const GURL& url) { … }
SourceType ToProtobufSourceType(SourceIdType source_id_type) { … }
AndroidActivityType ToProtobufActivityType(int32_t type) { … }
}
void UkmSource::SetAndroidActivityTypeState(int32_t activity_type) { … }
UkmSource::NavigationData::NavigationData() = default;
UkmSource::NavigationData::~NavigationData() = default;
UkmSource::NavigationData::NavigationData(const NavigationData& other) =
default;
UkmSource::NavigationData UkmSource::NavigationData::CopyWithSanitizedUrls(
std::vector<GURL> sanitized_urls) const { … }
UkmSource::UkmSource(ukm::SourceId id, const GURL& url)
: … { … }
UkmSource::UkmSource(ukm::SourceId id, const NavigationData& navigation_data)
: … { … }
UkmSource::~UkmSource() = default;
void UkmSource::UpdateUrl(const GURL& new_url) { … }
void UkmSource::PopulateProto(Source* proto_source) const { … }
}