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

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

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.cc
diff --git a/chrome/browser/metrics/metrics_reporting_state.cc b/chrome/browser/metrics/metrics_reporting_state.cc
index 1b748a6ac32d765028873f23f51b2f43bb637299..7128819d95cc9898164cf69d15f4353598959931 100644
--- a/chrome/browser/metrics/metrics_reporting_state.cc
+++ b/chrome/browser/metrics/metrics_reporting_state.cc
@@ -93,16 +93,20 @@ void OnDeviceSettingChange() {
bool enable_metrics = false;
chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref,
&enable_metrics);
- InitiateMetricsReportingChange(enable_metrics,
- OnMetricsReportingCallbackType());
+ ChangeMetricsReportingState(enable_metrics);
}
#endif
} // namespace
+void ChangeMetricsReportingState(bool enabled) {
+ ChangeMetricsReportingStateWithReply(enabled,
+ OnMetricsReportingCallbackType());
+}
Ilya Sherman 2016/08/05 03:39:06 nit: Please define this in the same order in the .
gayane -on leave until 09-2017 2016/08/05 17:31:43 Done.
+
// TODO(gayane): Instead of checking policy before setting the metrics pref set
// the pref and register for notifications for the rest of the changes.
-void InitiateMetricsReportingChange(
+void ChangeMetricsReportingStateWithReply(
bool enabled,
const OnMetricsReportingCallbackType& callback_fn) {
#if !defined(OS_ANDROID)

Powered by Google App Engine
This is Rietveld 408576698