| Index: chrome/common/json_pref_store.h
|
| diff --git a/chrome/common/json_pref_store.h b/chrome/common/json_pref_store.h
|
| index d8da37d08f1c5b34906c1334c7372a6f96a0f6ae..4c2100bca2a8b2c5307e08f278a9ca75949ebf98 100644
|
| --- a/chrome/common/json_pref_store.h
|
| +++ b/chrome/common/json_pref_store.h
|
| @@ -51,15 +51,17 @@ class JsonPrefStore : public PersistentPrefStore,
|
| virtual void RemoveValue(const std::string& key);
|
| virtual bool ReadOnly() const;
|
| virtual PrefReadError ReadPrefs();
|
| - // todo(altimofeev): move it to the PersistentPrefStore inteface.
|
| - void ReadPrefs(Delegate* delegate);
|
| + virtual void ReadPrefsAsync();
|
| + virtual void GetErrors(PrefReadError* error, bool* is_fatal);
|
| virtual bool WritePrefs();
|
| virtual void ScheduleWritePrefs();
|
| virtual void CommitPendingWrite();
|
| virtual void ReportValueChanged(const std::string& key);
|
|
|
| // This method is called after JSON file has been read. Method takes
|
| - // ownership of the |value| pointer.
|
| + // ownership of the |value| pointer. Note, this method is used with
|
| + // asynchronous file reading, so class exposes it only for the internal needs.
|
| + // (read: do not call it manually).
|
| void OnFileRead(Value* value_owned, PrefReadError error, bool no_dir);
|
|
|
| private:
|
| @@ -77,7 +79,8 @@ class JsonPrefStore : public PersistentPrefStore,
|
|
|
| ObserverList<PrefStore::Observer, true> observers_;
|
|
|
| - Delegate* delegate_;
|
| + PrefReadError error_;
|
| + bool is_fatal_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(JsonPrefStore);
|
| };
|
|
|