| Index: chrome/browser/prefs/pref_service.h
|
| diff --git a/chrome/browser/prefs/pref_service.h b/chrome/browser/prefs/pref_service.h
|
| index 6451a54527bb47023f8ba6a03d16e371db6d896c..94dc0f077caa1b6be042674be5d5472864f12f6b 100644
|
| --- a/chrome/browser/prefs/pref_service.h
|
| +++ b/chrome/browser/prefs/pref_service.h
|
| @@ -17,6 +17,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/hash_tables.h"
|
| +#include "base/observer_list.h"
|
| #include "base/prefs/public/pref_service_base.h"
|
| #include "base/threading/non_thread_safe.h"
|
|
|
| @@ -26,6 +27,7 @@ class PersistentPrefStore;
|
| class PrefModelAssociator;
|
| class PrefNotifier;
|
| class PrefNotifierImpl;
|
| +class PrefServiceObserver;
|
| class PrefStore;
|
| class PrefValueStore;
|
|
|
| @@ -128,6 +130,18 @@ class PrefService : public PrefServiceBase, public base::NonThreadSafe {
|
| // immediately (basically, during shutdown).
|
| void CommitPendingWrite();
|
|
|
| + void AddObserver(PrefServiceObserver* observer);
|
| + void RemoveObserver(PrefServiceObserver* observer);
|
| +
|
| + // Returns true if preferences state has synchronized with the remote
|
| + // preferences. If true is returned it can be assumed the local preferences
|
| + // has applied changes from the remote preferences. The two may not be
|
| + // identical if a change is in flight (from either side).
|
| + bool HasSynced();
|
| +
|
| + // Invoked internally when the HasSynced() state changes.
|
| + void HasSyncedChanged();
|
| +
|
| // PrefServiceBase implementation.
|
| virtual bool IsManagedPreference(const char* pref_name) const OVERRIDE;
|
| virtual bool IsUserModifiablePreference(const char* pref_name) const OVERRIDE;
|
| @@ -341,6 +355,8 @@ class PrefService : public PrefServiceBase, public base::NonThreadSafe {
|
| // "forked" PrefService.
|
| bool pref_service_forked_;
|
|
|
| + ObserverList<PrefServiceObserver> observer_list_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PrefService);
|
| };
|
|
|
|
|