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

Unified Diff: components/metrics_services_manager/metrics_services_manager.h

Issue 2333283005: Move EntropyProvider Source From MetricsService to MetricsServicesManager (Closed)
Patch Set: CR Feedback Created 4 years, 3 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
Index: components/metrics_services_manager/metrics_services_manager.h
diff --git a/components/metrics_services_manager/metrics_services_manager.h b/components/metrics_services_manager/metrics_services_manager.h
index d559ffbd92e4629be2c993256d4c467b2f7db223..e70d6489066c40e1278f51c593097ec4d3d2b647 100644
--- a/components/metrics_services_manager/metrics_services_manager.h
+++ b/components/metrics_services_manager/metrics_services_manager.h
@@ -8,6 +8,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/metrics/field_trial.h"
#include "base/threading/thread_checker.h"
namespace base {
@@ -42,6 +43,16 @@ class MetricsServicesManager {
std::unique_ptr<MetricsServicesManagerClient> client);
virtual ~MetricsServicesManager();
+ // Returns the preferred entropy provider used to seed persistent activities
+ // based on whether or not metrics reporting is permitted on this client.
+ //
+ // 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();
brettw 2016/09/14 22:22:03 Indent 4 spaces as above.
sdefresne 2016/09/15 11:30:07 I think this is correctly indented (at least this
robliao 2016/09/15 14:31:18 The stated rule: If you break after the return typ
+
// Returns the MetricsService, creating it if it hasn't been created yet (and
// additionally creating the MetricsServiceClient in that case).
metrics::MetricsService* GetMetricsService();

Powered by Google App Engine
This is Rietveld 408576698