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

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: 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_service.h ('k') | chrome/browser/prefs/pref_service_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_service.cc
diff --git a/chrome/browser/prefs/pref_service.cc b/chrome/browser/prefs/pref_service.cc
index 043be894b98e17abfb8a6f0b0d3478e1eea0309f..cca8041c850284e277887d6be536316148ee68bd 100644
--- a/chrome/browser/prefs/pref_service.cc
+++ b/chrome/browser/prefs/pref_service.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/prefs/command_line_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"
@@ -256,6 +257,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).
« no previous file with comments | « chrome/browser/prefs/pref_service.h ('k') | chrome/browser/prefs/pref_service_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698