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; |