#include "components/metrics/cloned_install_detector.h"
#include <stdint.h>
#include <string>
#include "base/callback_list.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/metrics_hashes.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool.h"
#include "components/metrics/machine_id_provider.h"
#include "components/metrics/metrics_pref_names.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
namespace metrics {
namespace {
uint32_t HashRawId(const std::string& value) { … }
enum MachineIdState { … };
void LogMachineIdState(MachineIdState state) { … }
}
ClonedInstallDetector::ClonedInstallDetector() { … }
ClonedInstallDetector::~ClonedInstallDetector() { … }
void ClonedInstallDetector::CheckForClonedInstall(PrefService* local_state) { … }
void ClonedInstallDetector::SaveMachineId(PrefService* local_state,
const std::string& raw_id) { … }
bool ClonedInstallDetector::ShouldResetClientIds(PrefService* local_state) { … }
bool ClonedInstallDetector::ClonedInstallDetectedInCurrentSession() const { … }
base::CallbackListSubscription
ClonedInstallDetector::AddOnClonedInstallDetectedCallback(
base::OnceClosure callback) { … }
void ClonedInstallDetector::SaveMachineIdForTesting(PrefService* local_state,
const std::string& raw_id) { … }
void ClonedInstallDetector::RegisterPrefs(PrefRegistrySimple* registry) { … }
ClonedInstallInfo ClonedInstallDetector::ReadClonedInstallInfo(
PrefService* local_state) { … }
void ClonedInstallDetector::ClearClonedInstallInfo(PrefService* local_state) { … }
void ClonedInstallDetector::RecordClonedInstallInfo(PrefService* local_state) { … }
}