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

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: fix func name 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
« no previous file with comments | « chrome/browser/metrics/metrics_reporting_state.h ('k') | chrome/browser/ui/cocoa/first_run_dialog.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
+}
+
// 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)
« no previous file with comments | « chrome/browser/metrics/metrics_reporting_state.h ('k') | chrome/browser/ui/cocoa/first_run_dialog.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698