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

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: Tweaks 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
Index: chrome/browser/prefs/pref_service.h
diff --git a/chrome/browser/prefs/pref_service.h b/chrome/browser/prefs/pref_service.h
index a083cc92ed9f7a38b91b7d86f5a8dd099aa5ab92..6f4fba29b2cd412504fb2e2584faf018c5a553c6 100644
--- a/chrome/browser/prefs/pref_service.h
+++ b/chrome/browser/prefs/pref_service.h
@@ -16,6 +16,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/observer_list.h"
#include "base/threading/non_thread_safe.h"
#include "chrome/browser/api/prefs/pref_service_base.h"
@@ -25,6 +26,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();
sky 2012/10/23 00:24:21 I'm not the biggest fan of this name. If you have
+
+ // 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;
@@ -343,6 +357,8 @@ class PrefService : public PrefServiceBase, public base::NonThreadSafe {
// "forked" PrefService.
bool pref_service_forked_;
+ ObserverList<PrefServiceObserver> observer_list_;
+
DISALLOW_COPY_AND_ASSIGN(PrefService);
};

Powered by Google App Engine
This is Rietveld 408576698