| Index: chrome/common/persistent_pref_store.h
|
| diff --git a/chrome/common/persistent_pref_store.h b/chrome/common/persistent_pref_store.h
|
| index 620fee8fabdce6839b0132a36408a6ec207a4a75..0f007c5a6b1c3530e743eb4383093ea6dabcd5cd 100644
|
| --- a/chrome/common/persistent_pref_store.h
|
| +++ b/chrome/common/persistent_pref_store.h
|
| @@ -34,6 +34,13 @@ class PersistentPrefStore : public PrefStore {
|
| PREF_READ_ERROR_FILE_NOT_SPECIFIED
|
| };
|
|
|
| + class ReadErrorDelegate {
|
| + public:
|
| + virtual ~ReadErrorDelegate() {}
|
| +
|
| + virtual void OnError(PrefReadError error) = 0;
|
| + };
|
| +
|
| // Equivalent to PrefStore::GetValue but returns a mutable value.
|
| virtual ReadResult GetMutableValue(const std::string& key,
|
| Value** result) = 0;
|
| @@ -62,9 +69,16 @@ class PersistentPrefStore : public PrefStore {
|
| // read errors during startup.
|
| virtual bool ReadOnly() const = 0;
|
|
|
| - // Reads the preferences from disk.
|
| + // Reads the preferences from disk. Notifies observers via
|
| + // "PrefStore::OnInitializationCompleted" when done.
|
| virtual PrefReadError ReadPrefs() = 0;
|
|
|
| + // Reads the preferences from disk asynchronously. Notifies observers via
|
| + // "PrefStore::OnInitializationCompleted" when done. Also it fires
|
| + // |error_delegate| if it is not NULL and reading error has occurred.
|
| + // Owns |error_delegate|.
|
| + virtual void ReadPrefsAsync(ReadErrorDelegate* error_delegate) = 0;
|
| +
|
| // Writes the preferences to disk immediately.
|
| virtual bool WritePrefs() = 0;
|
|
|
|
|