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

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

Issue 2215993002: Allow changing metrics reporting state without callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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: chrome/browser/metrics/metrics_reporting_state.h
diff --git a/chrome/browser/metrics/metrics_reporting_state.h b/chrome/browser/metrics/metrics_reporting_state.h
index 303255ced27232e485725ba102f54443e5918b1c..0768fd73776cbdc4ef981d9b2e42d0f36d2d2c5c 100644
--- a/chrome/browser/metrics/metrics_reporting_state.h
+++ b/chrome/browser/metrics/metrics_reporting_state.h
@@ -13,16 +13,19 @@ typedef base::Callback<void(bool)> OnMetricsReportingCallbackType;
class PrefService;
class PrefRegistrySimple;
-// Initiates a change to metrics reporting state to the new value of |enabled|.
-// Starts or stops the metrics service based on the new state and then runs
-// |callback_fn| (which can be null) with the updated state (as the operation
-// may fail). On platforms other than CrOS and Android, also updates the
-// underlying pref.
+// Changes metrics reporting state to the new value of |enabled|. Starts or
+// stops the metrics service based on the new state and then runs |callback_fn|
+// (which can be null) with the updated state (as the operation may fail). On
+// platforms other than CrOS and Android, also updates the underlying pref.
// TODO(gayane): Support setting the pref on all platforms.
-void InitiateMetricsReportingChange(
+void ChangeMetricsReportingStateWithReply(
bool enabled,
const OnMetricsReportingCallbackType& callback_fn);
+// Changes metrics reporting state without caring about the success of the
+// change.
+void ChangeMetricsReportingState(bool enabled);
+
// Returns whether MetricsReporting can be modified by the user (except
// Android).
bool IsMetricsReportingPolicyManaged();

Powered by Google App Engine
This is Rietveld 408576698