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

Unified Diff: chrome/browser/prefs/pref_service.h

Issue 11233049: Splits shelf alignment and auto-hide behavior into two values, one (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gr! Created 8 years, 2 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/pref_model_associator.cc ('k') | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « chrome/browser/prefs/pref_model_associator.cc ('k') | chrome/browser/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698