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

Unified Diff: chrome/common/pref_store_base.cc

Issue 5441002: Clean up pref change notification handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix extension prefs breakage Created 10 years 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/common/pref_store_base.h ('k') | chrome/common/pref_store_observer_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/pref_store_base.cc
diff --git a/chrome/common/pref_store_base.cc b/chrome/common/pref_store_base.cc
new file mode 100644
index 0000000000000000000000000000000000000000..07f79ff1e43d4b79cf435c1d918bde124cb55d4a
--- /dev/null
+++ b/chrome/common/pref_store_base.cc
@@ -0,0 +1,21 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/pref_store_base.h"
+
+void PrefStoreBase::AddObserver(PrefStore::ObserverInterface* observer) {
+ observers_.AddObserver(observer);
+}
+
+void PrefStoreBase::RemoveObserver(PrefStore::ObserverInterface* observer) {
+ observers_.RemoveObserver(observer);
+}
+
+void PrefStoreBase::NotifyPrefValueChanged(const std::string& key) {
+ FOR_EACH_OBSERVER(ObserverInterface, observers_, OnPrefValueChanged(key));
+}
+
+void PrefStoreBase::NotifyInitializationCompleted() {
+ FOR_EACH_OBSERVER(ObserverInterface, observers_, OnInitializationCompleted());
+}
« no previous file with comments | « chrome/common/pref_store_base.h ('k') | chrome/common/pref_store_observer_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698