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

Unified Diff: chrome/browser/extensions/api/preference/preference_api.cc

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.cc
diff --git a/chrome/browser/extensions/api/preference/preference_api.cc b/chrome/browser/extensions/api/preference/preference_api.cc
index a555e36dca87330ba1819fda50e6bb8a21f559e8..46e6751d1e82fbc313ef9bb1bdf6309ada254139 100644
--- a/chrome/browser/extensions/api/preference/preference_api.cc
+++ b/chrome/browser/extensions/api/preference/preference_api.cc
@@ -253,16 +253,12 @@ PreferenceEventRouter::PreferenceEventRouter(Profile* profile)
PreferenceEventRouter::~PreferenceEventRouter() { }
-void PreferenceEventRouter::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- DCHECK_EQ(chrome::NOTIFICATION_PREF_CHANGED, type);
- OnPrefChanged(content::Source<PrefService>(source).ptr(),
- *content::Details<const std::string>(details).ptr());
+void PreferenceEventRouter::OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) {
+ OnPrefChanged(service, pref_name);
}
-void PreferenceEventRouter::OnPrefChanged(PrefService* pref_service,
+void PreferenceEventRouter::OnPrefChanged(PrefServiceBase* pref_service,
const std::string& browser_pref) {
bool incognito = (pref_service != profile_->GetPrefs());
@@ -275,7 +271,7 @@ void PreferenceEventRouter::OnPrefChanged(PrefService* pref_service,
ListValue args;
DictionaryValue* dict = new DictionaryValue();
args.Append(dict);
- const PrefService::Preference* pref =
+ const PrefServiceBase::Preference* pref =
pref_service->FindPreference(browser_pref.c_str());
CHECK(pref);
ExtensionService* extension_service = profile_->GetExtensionService();
« no previous file with comments | « chrome/browser/extensions/api/preference/preference_api.h ('k') | chrome/browser/extensions/component_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698