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

Unified Diff: base/prefs/pref_service.cc

Issue 205813002: Separate storage for protected preferences into Protected Preferences file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pp4_profile_pref_store
Patch Set: Revert code that breaks tests, commit what works. Created 6 years, 9 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 | chrome/browser/prefs/pref_hash_filter.h » ('j') | chrome/browser/prefs/pref_hash_filter.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/pref_service.cc
diff --git a/base/prefs/pref_service.cc b/base/prefs/pref_service.cc
index 8a2c742109b3262261f98c58d1c6a659e5a08e60..a8e56d0b370680f9400e8432014d08b357fc4179 100644
--- a/base/prefs/pref_service.cc
+++ b/base/prefs/pref_service.cc
@@ -67,7 +67,9 @@ PrefService::~PrefService() {
}
void PrefService::InitFromStorage(bool async) {
- if (!async) {
+ if (user_pref_store_->IsInitializationComplete()) {
+ read_error_callback_.Run(user_pref_store_->GetReadError());
+ } else if (!async) {
read_error_callback_.Run(user_pref_store_->ReadPrefs());
} else {
// Guarantee that initialization happens after this function returned.
« no previous file with comments | « no previous file | chrome/browser/prefs/pref_hash_filter.h » ('j') | chrome/browser/prefs/pref_hash_filter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698