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

Unified Diff: components/ukm/ukm_service.h

Issue 2653693004: UKM Sync Observer (Closed)
Patch Set: Suppress recording and fix tests Created 3 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
Index: components/ukm/ukm_service.h
diff --git a/components/ukm/ukm_service.h b/components/ukm/ukm_service.h
index d154c7ce1f9b43fba5a2bd05a3baea232e9fbd0c..b7ea3a1baa2c3a3530f77087599366cc42786d64 100644
--- a/components/ukm/ukm_service.h
+++ b/components/ukm/ukm_service.h
@@ -45,6 +45,10 @@ class UkmService : public base::SupportsWeakPtr<UkmService> {
// Initializes the UKM service.
void Initialize();
+ // Enable/disable recording control if data is allowed to be collected.
+ void EnableRecording();
+ void DisableRecording();
+
// Enable/disable transmission of accumulated logs. Logs that have already
// been created will remain persisted to disk.
void EnableReporting();
@@ -60,6 +64,9 @@ class UkmService : public base::SupportsWeakPtr<UkmService> {
// Delete any unsent local data.
void Purge();
+ // Resets the client id stored in prefs.
+ void ResetClientId();
+
// Registers the names of all of the preferences used by UkmService in
// the provided PrefRegistry.
static void RegisterPrefs(PrefRegistrySimple* registry);
@@ -93,6 +100,9 @@ class UkmService : public base::SupportsWeakPtr<UkmService> {
// A weak pointer to the PrefService used to read and write preferences.
PrefService* pref_service_;
+ // Whether recording new data is currently allowed.
+ bool recording_enabled_;
+
// The UKM client id stored in prefs.
uint64_t client_id_;

Powered by Google App Engine
This is Rietveld 408576698