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

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

Issue 6894020: Adds async interface method to PersistentPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2010->2011 Created 9 years, 7 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 | « chrome/browser/prefs/testing_pref_store.h ('k') | chrome/browser/prefs/value_map_pref_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/testing_pref_store.cc
diff --git a/chrome/browser/prefs/testing_pref_store.cc b/chrome/browser/prefs/testing_pref_store.cc
index e85a8368364e8f255be2cb070297676c37cc5314..d08016914740a30e3c2459b19ca7f9556dd9b5ba 100644
--- a/chrome/browser/prefs/testing_pref_store.cc
+++ b/chrome/browser/prefs/testing_pref_store.cc
@@ -55,9 +55,16 @@ bool TestingPrefStore::ReadOnly() const {
PersistentPrefStore::PrefReadError TestingPrefStore::ReadPrefs() {
prefs_.Clear();
+ NotifyInitializationCompleted();
return PersistentPrefStore::PREF_READ_ERROR_NONE;
}
+void TestingPrefStore::ReadPrefsAsync(ReadErrorDelegate* error_delegate_raw) {
+ scoped_ptr<ReadErrorDelegate> error_delegate(error_delegate_raw);
+ prefs_.Clear();
+ NotifyInitializationCompleted();
+}
+
bool TestingPrefStore::WritePrefs() {
prefs_written_ = true;
return prefs_written_;
@@ -73,7 +80,7 @@ void TestingPrefStore::NotifyPrefValueChanged(const std::string& key) {
}
void TestingPrefStore::NotifyInitializationCompleted() {
- FOR_EACH_OBSERVER(Observer, observers_, OnInitializationCompleted());
+ FOR_EACH_OBSERVER(Observer, observers_, OnInitializationCompleted(true));
}
void TestingPrefStore::ReportValueChanged(const std::string& key) {
« no previous file with comments | « chrome/browser/prefs/testing_pref_store.h ('k') | chrome/browser/prefs/value_map_pref_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698