Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / chrome / browser / metrics / metrics_reporting_state.h
blob4716929571f674c31041ecd4567a10e1b4b4f2bb
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_
6 #define CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_
8 #include "base/callback.h"
10 typedef base::Callback<void(bool)> OnMetricsReportingCallbackType;
12 // Initiates a change to metrics reporting state to the new value of |enabled|.
13 // Starts or stops the metrics service based on the new state and then runs
14 // |callback_fn| (which can be null) with the updated state (as the operation
15 // may fail). On platforms other than CrOS and Android, also updates the
16 // underlying pref.
17 // TODO(gayane): Support setting the pref on all platforms.
18 void InitiateMetricsReportingChange(
19 bool enabled,
20 const OnMetricsReportingCallbackType& callback_fn);
22 // Returns whether MetricsReporting can be modified by the user (except CrOS and
23 // Android).
24 bool IsMetricsReportingUserChangable();
26 #endif // CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_