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

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

Issue 23653025: Change PrefService.ReadError histogram to sample success case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/chrome_pref_service_factory.cc
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc
index 0f5c90b6386a3f00afbfaaa9427fa5d30189caab..699a0d13c08185b99bd714235791ccce7cf396c1 100644
--- a/chrome/browser/prefs/chrome_pref_service_factory.cc
+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -39,6 +39,11 @@ namespace {
// Shows notifications which correspond to PersistentPrefStore's reading errors.
void HandleReadError(PersistentPrefStore::PrefReadError error) {
+ // Sample the histogram also for the successful case in order to get a
+ // baseline on the success rate in addition to the error distribution.
+ UMA_HISTOGRAM_ENUMERATION("PrefService.ReadError", error,
+ PersistentPrefStore::PREF_READ_ERROR_MAX_ENUM);
+
if (error != PersistentPrefStore::PREF_READ_ERROR_NONE) {
#if !defined(OS_CHROMEOS)
// Failing to load prefs on startup is a bad thing(TM). See bug 38352 for
@@ -59,8 +64,6 @@ void HandleReadError(PersistentPrefStore::PrefReadError error) {
// On ChromeOS error screen with message about broken local state
// will be displayed.
#endif
- UMA_HISTOGRAM_ENUMERATION("PrefService.ReadError", error,
- PersistentPrefStore::PREF_READ_ERROR_MAX_ENUM);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698