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

Unified Diff: components/metrics/metrics_reporting_default_state.h

Issue 2014463003: Modifications for recording whether UMA/Crash default state for iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « components/metrics/metrics_pref_names.cc ('k') | components/metrics/metrics_reporting_default_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1905a3056a998a4515007e3b9fe096f04c4aa462
--- /dev/null
+++ b/components/metrics/metrics_reporting_default_state.h
@@ -0,0 +1,34 @@
+// 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 21:08:58 Nit: Move these #includes to the .cc file when you
gayane -on leave until 09-2017 2016/06/01 18:58:38 Done.
+
+class PrefRegistrySimple;
+class PrefService;
+
+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.
+MetricsServiceClient::EnableMetricsDefault GetMetricsReportingDefaultOptIn(
+ PrefService* local_state);
+
+} // namespace metrics
+
+#endif // COMPONENTS_METRICS_METRICS_REPORTING_DEFAULT_STATE_H_
« no previous file with comments | « components/metrics/metrics_pref_names.cc ('k') | components/metrics/metrics_reporting_default_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698