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

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

Issue 6894020: Adds async interface method to PersistentPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unittest for asyn reading 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/overlay_persistent_pref_store.cc
diff --git a/chrome/browser/prefs/overlay_persistent_pref_store.cc b/chrome/browser/prefs/overlay_persistent_pref_store.cc
index e75fbc66b33a72da7e94f61e6d04867f6b903973..9bd1992b10008a1f7b42a184df3419502663d511 100644
--- a/chrome/browser/prefs/overlay_persistent_pref_store.cc
+++ b/chrome/browser/prefs/overlay_persistent_pref_store.cc
@@ -80,9 +80,15 @@ bool OverlayPersistentPrefStore::ReadOnly() const {
PersistentPrefStore::PrefReadError OverlayPersistentPrefStore::ReadPrefs() {
// We do not read intentionally.
+ OnInitializationCompleted(true);
return PersistentPrefStore::PREF_READ_ERROR_NONE;
}
+void OverlayPersistentPrefStore::ReadPrefsAsync(ReadErrorDelegate* delegate) {
+ // We do not read intentionally.
+ OnInitializationCompleted(true);
+}
+
bool OverlayPersistentPrefStore::WritePrefs() {
// We do not write intentionally.
return true;
@@ -105,7 +111,7 @@ void OverlayPersistentPrefStore::OnPrefValueChanged(const std::string& key) {
FOR_EACH_OBSERVER(PrefStore::Observer, observers_, OnPrefValueChanged(key));
}
-void OverlayPersistentPrefStore::OnInitializationCompleted() {
+void OverlayPersistentPrefStore::OnInitializationCompleted(bool succeeded) {
FOR_EACH_OBSERVER(PrefStore::Observer, observers_,
- OnInitializationCompleted());
+ OnInitializationCompleted(succeeded));
}

Powered by Google App Engine
This is Rietveld 408576698