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

Unified Diff: chrome/browser/prefs/pref_metrics_service.cc

Issue 27273004: Record stats about kExtensionKnownDisabled with the PrefMetricsService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_metrics_service.cc
diff --git a/chrome/browser/prefs/pref_metrics_service.cc b/chrome/browser/prefs/pref_metrics_service.cc
index 2ee5e1ae2b49ceb63710c778462df3e242ac14dd..966721c68fbe71bbb1d274ffb0dd79c73fd82580 100644
--- a/chrome/browser/prefs/pref_metrics_service.cc
+++ b/chrome/browser/prefs/pref_metrics_service.cc
@@ -38,6 +38,13 @@ namespace {
const int kSessionStartupPrefValueMax = SessionStartupPref::kPrefValueMax;
+// An unregistered preference to fill in indices in kTrackedPrefs below for
+// preferences that aren't defined on every platform. This is fine as the code
+// below (e.g. CheckTrackedPreferences()) skips unregistered preferences and
+// should thus never report any data about that index on the platforms where
+// that preference is unimplemented.
+const char kUnregisteredPreference = "unregistered.preference";
bbudge 2013/10/15 18:56:00 I wonder if an empty string might be a better valu
gab 2013/10/15 19:09:35 Used "_" -- it's cuter ;)... but more seriously I
+
// These preferences must be kept in sync with the TrackedPreference enum in
// tools/metrics/histograms/histograms.xml. To add a new preference, append it
// to the array and add a corresponding value to the histogram enum.
@@ -55,7 +62,10 @@ const char* kTrackedPrefs[] = {
prefs::kDefaultSearchProviderName,
#if !defined(OS_ANDROID)
prefs::kPinnedTabs,
+#else
+ kUnregisteredPreference,
#endif
+ prefs::kExtensionKnownDisabled,
};
static const size_t kSHA256DigestSize = 32;
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698