#ifndef CHROME_BROWSER_METRICS_CLONED_INSTALL_DETECTOR_H_
#define CHROME_BROWSER_METRICS_CLONED_INSTALL_DETECTOR_H_
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
class PrefRegistrySimple;
class PrefService;
namespace metrics {
class MachineIdProvider;
class ClonedInstallDetector {
public:
explicit ClonedInstallDetector(MachineIdProvider* raw_id_provider);
virtual ~ClonedInstallDetector();
void CheckForClonedInstall(PrefService* local_state);
static void RegisterPrefs(PrefRegistrySimple* registry);
private:
FRIEND_TEST_ALL_PREFIXES(ClonedInstallDetectorTest, SaveId);
FRIEND_TEST_ALL_PREFIXES(ClonedInstallDetectorTest, DetectClone);
void SaveMachineId(PrefService* local_state, std::string raw_id);
scoped_refptr<MachineIdProvider> raw_id_provider_;
base::WeakPtrFactory<ClonedInstallDetector> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(ClonedInstallDetector);
};
}
#endif