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

Unified Diff: chrome/browser/metrics/metrics_services_manager.h

Issue 937013002: Propogate RAPPOR permission changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment Created 5 years, 10 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 | « no previous file | chrome/browser/metrics/metrics_services_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_services_manager.h
diff --git a/chrome/browser/metrics/metrics_services_manager.h b/chrome/browser/metrics/metrics_services_manager.h
index fb5de48ff25b12f31aa66bd1d39b5a7b7eb7503a..72ec3f797ff4d0a6f11961349a13bcf7f42806d5 100644
--- a/chrome/browser/metrics/metrics_services_manager.h
+++ b/chrome/browser/metrics/metrics_services_manager.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
+#include "base/prefs/pref_change_registrar.h"
#include "base/threading/thread_checker.h"
#include "components/rappor/rappor_service.h"
@@ -66,6 +67,10 @@ class MetricsServicesManager {
rappor::RecordingLevel GetRapporRecordingLevel(bool metrics_enabled) const;
private:
+ // Update the managed services when permissions for recording/uploading
+ // metrics change.
+ void UpdateRapporService();
+
// Returns the ChromeMetricsServiceClient, creating it if it hasn't been
// created yet (and additionally creating the MetricsService in that case).
ChromeMetricsServiceClient* GetChromeMetricsServiceClient();
@@ -78,6 +83,15 @@ class MetricsServicesManager {
// Weak pointer to the local state prefs store.
PrefService* local_state_;
+ // A change registrar for local_state_;
+ PrefChangeRegistrar pref_change_registrar_;
+
+ // The current metrics reporting setting.
+ bool may_upload_;
+
+ // The current metrics recording setting.
+ bool may_record_;
+
// MetricsStateManager which is passed as a parameter to service constructors.
scoped_ptr<metrics::MetricsStateManager> metrics_state_manager_;
« no previous file with comments | « no previous file | chrome/browser/metrics/metrics_services_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698