Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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. | |
| 4 | |
| 5 #ifndef COMPONENTS_METRICS_METRICS_REPORTING_DEFAULT_STATE_H_ | |
| 6 #define COMPONENTS_METRICS_METRICS_REPORTING_DEFAULT_STATE_H_ | |
| 7 | |
| 8 #include "components/metrics/metrics_service_client.h" | |
| 9 #include "components/prefs/pref_registry_simple.h" | |
| 10 #include "components/prefs/pref_service.h" | |
|
Alexei Svitkine (slow)
2016/05/26 19:24:15
Nit: Forward declare the Prefs classes.
gayane -on leave until 09-2017
2016/05/26 20:33:37
Done.
| |
| 11 | |
| 12 namespace metrics { | |
| 13 | |
| 14 // Register prefs relating to metrics reporting state. Currently only registers | |
| 15 // a pref for metrics reporting default opt-in state. | |
| 16 void RegisterMetricsReportingStatePrefs(PrefRegistrySimple* registry); | |
| 17 | |
| 18 // Sets whether metrics reporting was opt-in or not. If it was opt-in, then the | |
| 19 // enable checkbox on first-run was default unchecked. If it was opt-out, then | |
| 20 // the checkbox was default checked. This should only be set once, and only | |
| 21 // during first-run. | |
| 22 void RecordMetricsReportingDefaultOptIn(PrefService* local_state, bool opt_in); | |
| 23 | |
| 24 // Gets information about the default value for the enable metrics reporting | |
| 25 // checkbox shown during first-run. | |
| 26 metrics::MetricsServiceClient::EnableMetricsDefault | |
|
Alexei Svitkine (slow)
2016/05/26 19:24:15
Nit: No need for metrics:: prefix
gayane -on leave until 09-2017
2016/05/26 20:33:37
Done.
| |
| 27 GetMetricsReportingDefaultOptIn(PrefService* local_state); | |
| 28 | |
| 29 } // namespace metrics | |
| 30 | |
| 31 #endif // COMPONENTS_METRICS_METRICS_REPORTING_DEFAULT_STATE_H_ | |
| OLD | NEW |