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

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

Issue 571893002: Added an error message when local state corruption is detected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Error message is suppressed in case of no error or no file. Created 6 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 81b2c6670c8f92deaf05cf5067846753f6acb13f..bd00998e52c80fb70a8a0c6705a85e3fbeea114d 100644
--- a/chrome/browser/prefs/chrome_pref_service_factory.cc
+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -307,9 +307,13 @@ GetTrackingConfiguration() {
return result;
}
-
// Shows notifications which correspond to PersistentPrefStore's reading errors.
void HandleReadError(PersistentPrefStore::PrefReadError error) {
+ if (error != PersistentPrefStore::PREF_READ_ERROR_NONE &&
+ error != PersistentPrefStore::PREF_READ_ERROR_NO_FILE) {
+ LOG(ERROR) << "An error happened during prefs loading: " << 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,
« 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