Index: chrome/browser/extensions/api/font_settings/font_settings_api.h |
diff --git a/chrome/browser/extensions/api/font_settings/font_settings_api.h b/chrome/browser/extensions/api/font_settings/font_settings_api.h |
index 9c73cf05e6a573b47a18a14039ecdb6e2227ccf1..60ebca286fb5c05f2ca438e6d919fa7a536e4150 100644 |
--- a/chrome/browser/extensions/api/font_settings/font_settings_api.h |
+++ b/chrome/browser/extensions/api/font_settings/font_settings_api.h |
@@ -13,6 +13,7 @@ |
#include <utility> |
#include "base/prefs/public/pref_change_registrar.h" |
+#include "base/prefs/public/pref_observer.h" |
#include "chrome/browser/extensions/extension_function.h" |
#include "chrome/browser/prefs/pref_service.h" |
@@ -20,7 +21,7 @@ namespace extensions { |
// This class observes pref changed events on a profile and dispatches the |
// corresponding extension API events to extensions. |
-class FontSettingsEventRouter : public content::NotificationObserver { |
+class FontSettingsEventRouter : public PrefObserver { |
public: |
// Constructor for observing pref changed events on |profile|. Stores a |
// pointer to |profile| but does not take ownership. |profile| must be |
@@ -48,10 +49,9 @@ class FontSettingsEventRouter : public content::NotificationObserver { |
const char* event_name, |
const char* key); |
- // 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; |
// Dispatches a changed event for the font setting for |generic_family| and |
// |script| to extensions. The new value of the setting is the value of |
@@ -70,7 +70,7 @@ class FontSettingsEventRouter : public content::NotificationObserver { |
// under the key |key|. If the pref changed on the incognito profile, |
// |incognito| must be set to true for extensions to get the appropriate |
// event. |
- void OnFontPrefChanged(PrefService* pref_service, |
+ void OnFontPrefChanged(PrefServiceBase* pref_service, |
const std::string& pref_name, |
const std::string& event_name, |
const std::string& key, |