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

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

Issue 6894020: Adds async interface method to PersistentPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 9 years, 8 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
Index: chrome/browser/prefs/pref_value_store.cc
diff --git a/chrome/browser/prefs/pref_value_store.cc b/chrome/browser/prefs/pref_value_store.cc
index 3318a1dd428100eca21c468bc47d173af991120b..b12cb3f92804b362c107bed8d45dd63086bbdf71 100644
--- a/chrome/browser/prefs/pref_value_store.cc
+++ b/chrome/browser/prefs/pref_value_store.cc
@@ -37,8 +37,9 @@ void PrefValueStore::PrefStoreKeeper::OnPrefValueChanged(
pref_value_store_->OnPrefValueChanged(type_, key);
}
-void PrefValueStore::PrefStoreKeeper::OnInitializationCompleted() {
- pref_value_store_->OnInitializationCompleted(type_);
+void PrefValueStore::PrefStoreKeeper::OnInitializationCompleted(
+ bool succeeded) {
+ pref_value_store_->OnInitializationCompleted(type_, succeeded);
}
PrefValueStore::PrefValueStore(PrefStore* managed_platform_prefs,
@@ -238,7 +239,11 @@ void PrefValueStore::OnPrefValueChanged(PrefValueStore::PrefStoreType type,
}
void PrefValueStore::OnInitializationCompleted(
- PrefValueStore::PrefStoreType type) {
+ PrefValueStore::PrefStoreType type, bool succeeded) {
+ if (!succeeded) {
Mattias Nissler (ping if slow) 2011/05/04 23:33:08 There's a problem here: If you have a PrefStore re
altimofeev 2011/05/05 12:59:28 Actually, to prevent it, IsInitializationComplete(
Mattias Nissler (ping if slow) 2011/05/07 00:24:14 But then IsInitializationComplete() is a misnomer,
altimofeev 2011/05/10 11:10:22 Agree, misnomer is no good. So now PrevValueStore
+ pref_notifier_->OnInitializationCompleted(false);
+ return;
+ }
CheckInitializationCompleted();
}
@@ -254,5 +259,5 @@ void PrefValueStore::CheckInitializationCompleted() {
if (store && !store->IsInitializationComplete())
return;
}
- pref_notifier_->OnInitializationCompleted();
+ pref_notifier_->OnInitializationCompleted(true);
}

Powered by Google App Engine
This is Rietveld 408576698