Index: chrome/browser/metrics/cloned_install_detector.cc |
diff --git a/chrome/browser/metrics/cloned_install_detector.cc b/chrome/browser/metrics/cloned_install_detector.cc |
index 3ecfd2ccea742a6e4a0d5c52cf70f0b7ddc5f6c9..db52b842d1d84f256a6a5fcdd9293c0849c3c78b 100644 |
--- a/chrome/browser/metrics/cloned_install_detector.cc |
+++ b/chrome/browser/metrics/cloned_install_detector.cc |
@@ -72,8 +72,14 @@ void ClonedInstallDetector::SaveMachineId( |
MachineIdState id_state = ID_NO_STORED_VALUE; |
if (local_state->HasPrefPath(prefs::kMetricsMachineId)) { |
- id_state = local_state->GetInteger(prefs::kMetricsMachineId) == hashed_id ? |
- ID_UNCHANGED : ID_CHANGED; |
+ if (local_state->GetInteger(prefs::kMetricsMachineId) != hashed_id) { |
+ id_state = ID_CHANGED; |
+ // TODO(jwd): Use a callback to set the reset pref. That way |
+ // ClonedInstallDetector doesn't need to know about this pref. |
+ local_state->SetBoolean(prefs::kMetricsResetIds, true); |
+ } else { |
+ id_state = ID_UNCHANGED; |
+ } |
} |
LogMachineIdState(id_state); |