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

Unified Diff: chrome/browser/extensions/api/preference/preference_api.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
Index: chrome/browser/extensions/api/preference/preference_api.h
diff --git a/chrome/browser/extensions/api/preference/preference_api.h b/chrome/browser/extensions/api/preference/preference_api.h
index 7bf67cdd76080ac0ece3d33fdad0789d2bc7cf24..c6e7f4b6cb74d343c7aadbf184e551e04d495115 100644
--- a/chrome/browser/extensions/api/preference/preference_api.h
+++ b/chrome/browser/extensions/api/preference/preference_api.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "chrome/browser/extensions/extension_function.h"
#include "content/public/browser/notification_observer.h"
@@ -19,18 +20,18 @@ class Value;
namespace extensions {
-class PreferenceEventRouter : public content::NotificationObserver {
+class PreferenceEventRouter : public PrefObserver {
public:
explicit PreferenceEventRouter(Profile* profile);
virtual ~PreferenceEventRouter();
private:
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver implementation.
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
- void OnPrefChanged(PrefService* pref_service, const std::string& pref_key);
+ void OnPrefChanged(PrefServiceBase* pref_service,
+ const std::string& pref_key);
// This method dispatches events to the extension message service.
void DispatchEvent(const std::string& extension_id,

Powered by Google App Engine
This is Rietveld 408576698