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

Unified Diff: chrome/browser/extensions/api/font_settings/font_settings_api.h

Issue 11377131: Removing PrefObserver usage, batch 4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/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 a81c7a9dc2a025979e789459ebc5bc76eb1169d6..38ec94f38b0ef90b2bb68c620e36693fc487bc22 100644
--- a/chrome/browser/extensions/api/font_settings/font_settings_api.h
+++ b/chrome/browser/extensions/api/font_settings/font_settings_api.h
@@ -13,7 +13,6 @@
#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"
@@ -21,7 +20,7 @@ namespace extensions {
// This class observes pref changed events on a profile and dispatches the
// corresponding extension API events to extensions.
-class FontSettingsEventRouter : public PrefObserver {
+class FontSettingsEventRouter {
public:
// Constructor for observing pref changed events on |profile|. Stores a
// pointer to |profile| but does not take ownership. |profile| must be
@@ -44,17 +43,14 @@ class FontSettingsEventRouter : public PrefObserver {
const char* event_name,
const char* key);
- // PrefObserver implementation.
- virtual void OnPreferenceChanged(PrefServiceBase* service,
- const std::string& pref_name) OVERRIDE;
+ void OnPreferenceChanged(const std::string& pref_name);
// 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
// browser pref |pref_name|. If the pref changed on the incognito profile,
// |incognito| must be set to true for extensions to get the appropriate
// event.
- void OnFontNamePrefChanged(PrefServiceBase* pref_service,
- const std::string& pref_name,
+ void OnFontNamePrefChanged(const std::string& pref_name,
const std::string& generic_family,
const std::string& script,
bool incognito);
@@ -65,8 +61,7 @@ class FontSettingsEventRouter : public PrefObserver {
// 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(PrefServiceBase* pref_service,
- const std::string& pref_name,
+ void OnFontPrefChanged(const std::string& pref_name,
const std::string& event_name,
const std::string& key,
bool incognito);

Powered by Google App Engine
This is Rietveld 408576698