Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ | 5 #ifndef CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ |
| 6 #define CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ | 6 #define CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ |
| 7 | 7 |
| 8 // Tries to set crash stats upload consent to |enabled|. Regardless of success, | 8 #include "base/callback.h" |
| 9 // if crash stats uploading is enabled, starts the MetricsService; otherwise | 9 |
| 10 // stops it. | 10 // Initiates a change to metrics reporting state to the new value of |enabled|. |
| 11 // Returns whether crash stats uploading is enabled. | 11 // Starts or stops the metrics service based on the new state and then runs |
| 12 // TODO(tfarina): This method is pretty confusing. Clean this up and rename it | 12 // |callback_fn| (which can be null) with the updated state (as the operation |
| 13 // to something that makes more sense. | 13 // may fail). On platforms other than CrOS and Android, also updates the |
| 14 bool ResolveMetricsReportingEnabled(bool enabled); | 14 // underlying pref. |
| 15 // TODO(gayane): Support setting the pref on all platforms. | |
| 16 void InitiateMetricsReportingChange( | |
| 17 bool enabled, | |
| 18 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.
| |
| 19 | |
| 20 // Returns whether MetricsReporting can be modified by the user (except CrOS and | |
| 21 // Android). | |
| 22 bool IsMetricsReportingUserChangable(); | |
| 15 | 23 |
| 16 #endif // CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ | 24 #endif // CHROME_BROWSER_METRICS_METRICS_REPORTING_STATE_H_ |
| OLD | NEW |