Index: chrome/browser/metrics/metrics_service.h |
diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h |
index f50934d0db5d53e72d624dcde35a735a02e18a23..15c66d72ed857936968e401670b2f2d58d74f12e 100644 |
--- a/chrome/browser/metrics/metrics_service.h |
+++ b/chrome/browser/metrics/metrics_service.h |
@@ -368,6 +368,10 @@ class MetricsService |
base::TimeDelta* incremental_uptime, |
base::TimeDelta* uptime); |
+ // Reset the client id and low entropy source if the kMetricsResetMetricIDs |
+ // pref is true. |
+ void ResetMetricsIDsIfNecessary(); |
+ |
// Returns the low entropy source for this client. This is a random value |
// that is non-identifying amongst browser clients. This method will |
// generate the entropy source value if it has not been called before. |
@@ -523,6 +527,11 @@ class MetricsService |
content::NotificationRegistrar registrar_; |
+ // Set to true when the client id and low entropy source have been reset due |
+ // to the kMetricsResetIds pref being true. This prevents multiple resets |
Alexei Svitkine (slow)
2014/03/28 19:49:02
This comment isn't correct. It's also set to true
jwd
2014/03/28 19:58:58
Done.
|
+ // within the same chrome session. |
+ bool metrics_ids_reset_check_performed_; |
+ |
// Indicate whether recording and reporting are currently happening. |
// These should not be set directly, but by calling SetRecording and |
// SetReporting. |
@@ -639,6 +648,7 @@ class MetricsService |
FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, |
PermutedEntropyCacheClearedWhenLowEntropyReset); |
FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); |
+ FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, ResetMetricsIDs); |
FRIEND_TEST_ALL_PREFIXES(MetricsServiceBrowserTest, |
CheckLowEntropySourceUsed); |
FRIEND_TEST_ALL_PREFIXES(MetricsServiceReportingTest, |