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

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

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.cc
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index 10d7078989cfa4f7af59f96d16424134a12e45fb..fd6200fddf2c7d3307a10b39392cfeb75d841570 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/prefs/overlay_user_pref_store.h"
#include "chrome/browser/prefs/pref_model_associator.h"
#include "chrome/browser/prefs/pref_notifier_impl.h"
+#include "chrome/browser/prefs/pref_service_observer.h"
#include "chrome/browser/prefs/pref_value_store.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
@@ -258,6 +259,23 @@ void PrefService::CommitPendingWrite() {
user_pref_store_->CommitPendingWrite();
}
+void PrefService::AddObserver(PrefServiceObserver* observer) {
+ observer_list_.AddObserver(observer);
+}
+
+void PrefService::RemoveObserver(PrefServiceObserver* observer) {
+ observer_list_.RemoveObserver(observer);
+}
+
+bool PrefService::HasSynced() {
+ return pref_sync_associator_.get() &&
+ pref_sync_associator_->models_associated();
+}
+
+void PrefService::HasSyncedChanged() {
+ FOR_EACH_OBSERVER(PrefServiceObserver, observer_list_, OnHasSyncedChanged());
+}
+
namespace {
// If there's no g_browser_process or no local state, return true (for testing).

Powered by Google App Engine
This is Rietveld 408576698