Chromium Code Reviews| Index: components/metrics/metrics_reporting_default_state.h |
| diff --git a/components/metrics/metrics_reporting_default_state.h b/components/metrics/metrics_reporting_default_state.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3b1ceeef70a61b8cab68f70e60d4a5339a949f86 |
| --- /dev/null |
| +++ b/components/metrics/metrics_reporting_default_state.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_METRICS_METRICS_REPORTING_DEFAULT_STATE_H_ |
| +#define COMPONENTS_METRICS_METRICS_REPORTING_DEFAULT_STATE_H_ |
| + |
| +#include "components/metrics/metrics_service_client.h" |
| +#include "components/prefs/pref_registry_simple.h" |
| +#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.
|
| + |
| +namespace metrics { |
| + |
| +// Register prefs relating to metrics reporting state. Currently only registers |
| +// a pref for metrics reporting default opt-in state. |
| +void RegisterMetricsReportingStatePrefs(PrefRegistrySimple* registry); |
| + |
| +// Sets whether metrics reporting was opt-in or not. If it was opt-in, then the |
| +// enable checkbox on first-run was default unchecked. If it was opt-out, then |
| +// the checkbox was default checked. This should only be set once, and only |
| +// during first-run. |
| +void RecordMetricsReportingDefaultOptIn(PrefService* local_state, bool opt_in); |
| + |
| +// Gets information about the default value for the enable metrics reporting |
| +// checkbox shown during first-run. |
| +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.
|
| +GetMetricsReportingDefaultOptIn(PrefService* local_state); |
| + |
| +} // namespace metrics |
| + |
| +#endif // COMPONENTS_METRICS_METRICS_REPORTING_DEFAULT_STATE_H_ |