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 c333d84e52b87cfbe39697c3be71c829659838a2..9a1050f7cfe282133c727b72459d365b08a3b95c 100644 |
--- a/chrome/browser/metrics/metrics_reporting_state.h |
+++ b/chrome/browser/metrics/metrics_reporting_state.h |
@@ -5,12 +5,20 @@ |
#ifndef CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ |
#define CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ |
-// Tries to set crash stats upload consent to |enabled|. Regardless of success, |
-// if crash stats uploading is enabled, starts the MetricsService; otherwise |
-// stops it. |
-// Returns whether crash stats uploading is enabled. |
-// TODO(tfarina): This method is pretty confusing. Clean this up and rename it |
-// to something that makes more sense. |
-bool ResolveMetricsReportingEnabled(bool enabled); |
+#include "base/callback.h" |
+ |
+// 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. |
+// TODO(gayane): Support setting the pref on all platforms. |
+void InitiateMetricsReportingChange( |
+ bool enabled, |
+ const base::Callback<void(bool)> callback_fn); |
stevenjb
2014/09/11 20:31:44
Use callback typedef here also.
gayane -on leave until 09-2017
2014/09/12 17:44:51
Done.
|
+ |
+// Returns whether MetricsReporting can be modified by the user (except CrOS and |
+// Android). |
+bool IsMetricsReportingUserChangable(); |
#endif // CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ |