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

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: nits 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..4a55ae07a89b1dfe10392bbf85e2bc4a6fe06a56 100644
--- a/chrome/browser/prefs/pref_metrics_service.cc
+++ b/chrome/browser/prefs/pref_metrics_service.cc
@@ -17,7 +17,6 @@
// TODO(bbudge) Move the API so it's usable here.
// http://crbug.com/276485
#include "chrome/browser/extensions/api/music_manager_private/device_id.h"
-#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/prefs/session_startup_pref.h"
@@ -38,6 +37,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[] = "_";
+
// 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 +61,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