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

Unified Diff: base/prefs/public/pref_change_registrar.h

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit Created 8 years, 1 month 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 | « base/base.gyp ('k') | base/prefs/public/pref_change_registrar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/public/pref_change_registrar.h
diff --git a/base/prefs/public/pref_change_registrar.h b/base/prefs/public/pref_change_registrar.h
index a7e1eab4fd5d1a303ce7469a0a6f4a53e5908187..f3abd9869191056aedecb8a731f499c94414f521 100644
--- a/base/prefs/public/pref_change_registrar.h
+++ b/base/prefs/public/pref_change_registrar.h
@@ -11,12 +11,9 @@
#include "base/basictypes.h"
#include "base/prefs/base_prefs_export.h"
+class PrefObserver;
class PrefServiceBase;
-namespace content {
-class NotificationObserver;
-}
-
// Automatically manages the registration of one or more pref change observers
// with a PrefStore. Functions much like NotificationRegistrar, but specifically
// manages observers of preference changes. When the Registrar is destroyed,
@@ -34,13 +31,11 @@ class BASE_PREFS_EXPORT PrefChangeRegistrar {
// object. All registered observers will be automatically unregistered
// when the registrar's destructor is called unless the observer has been
// explicitly removed by a call to Remove beforehand.
- void Add(const char* path,
- content::NotificationObserver* obs);
+ void Add(const char* path, PrefObserver* obs);
// Removes a preference observer that has previously been added with a call to
// Add.
- void Remove(const char* path,
- content::NotificationObserver* obs);
+ void Remove(const char* path, PrefObserver* obs);
// Removes all observers that have been previously added with a call to Add.
void RemoveAll();
@@ -55,8 +50,7 @@ class BASE_PREFS_EXPORT PrefChangeRegistrar {
bool IsManaged();
private:
- typedef std::pair<std::string, content::NotificationObserver*>
- ObserverRegistration;
+ typedef std::pair<std::string, PrefObserver*> ObserverRegistration;
std::set<ObserverRegistration> observers_;
PrefServiceBase* service_;
« no previous file with comments | « base/base.gyp ('k') | base/prefs/public/pref_change_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698