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

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: 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 | « no previous file | base/prefs/public/pref_change_registrar.cc » ('j') | base/prefs/public/pref_init_observer.h » ('J')
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 97743e2317464aced22c0ce2c055139398b081c9..730f2afc350f4c2a047677582a276f693e77edd3 100644
--- a/base/prefs/public/pref_change_registrar.h
+++ b/base/prefs/public/pref_change_registrar.h
@@ -10,12 +10,9 @@
#include "base/basictypes.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,
@@ -33,13 +30,11 @@ class 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();
@@ -54,8 +49,7 @@ class 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 | « no previous file | base/prefs/public/pref_change_registrar.cc » ('j') | base/prefs/public/pref_init_observer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698