Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: components/metrics/metrics_state_manager.h

Issue 1984003002: Use low entropy for studies that send experiment IDs to Google properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/metrics/metrics_service.cc ('k') | components/metrics/metrics_state_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_state_manager.h
diff --git a/components/metrics/metrics_state_manager.h b/components/metrics/metrics_state_manager.h
index 957d9a9d84748319029bde8576012c2a6a2dd355..afa146b98c02a2a4d4096e0560428a939bc76b37 100644
--- a/components/metrics/metrics_state_manager.h
+++ b/components/metrics/metrics_state_manager.h
@@ -61,12 +61,19 @@ class MetricsStateManager {
// Returns the preferred entropy provider used to seed persistent activities
// based on whether or not metrics reporting is permitted on this client.
//
- // If metrics reporting is enabled, this method returns an entropy provider
- // that has a high source of entropy, partially based on the client ID.
- // Otherwise, it returns an entropy provider that is based on a low entropy
- // source.
+ // If there's consent to report metrics, this method returns an entropy
+ // provider that has a high source of entropy, partially based on the client
+ // ID. Otherwise, it returns an entropy provider that is based on a low
+ // entropy source.
std::unique_ptr<const base::FieldTrial::EntropyProvider>
- CreateEntropyProvider();
+ CreateDefaultEntropyProvider();
+
+ // Returns an entropy provider that is based on a low entropy source. This
+ // provider is the same type of provider returned by
+ // CreateDefaultEntropyProvider when there's no consent to report metrics, but
+ // will be a new instance.
+ std::unique_ptr<const base::FieldTrial::EntropyProvider>
+ CreateLowEntropyProvider();
// Creates the MetricsStateManager, enforcing that only a single instance
// of the class exists at a time. Returns NULL if an instance exists already.
« no previous file with comments | « components/metrics/metrics_service.cc ('k') | components/metrics/metrics_state_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698