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

Unified Diff: chrome/browser/protector/base_prefs_change.cc

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR. 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
Index: chrome/browser/protector/base_prefs_change.cc
diff --git a/chrome/browser/protector/base_prefs_change.cc b/chrome/browser/protector/base_prefs_change.cc
index 2a4a8719ef7e8ac899bd85562c2f1f4b2458a155..9ca25c8930524bbb2ad595426ef8bd264132107b 100644
--- a/chrome/browser/protector/base_prefs_change.cc
+++ b/chrome/browser/protector/base_prefs_change.cc
@@ -43,12 +43,9 @@ void BasePrefsChange::IgnorePrefChanges() {
pref_observer_.RemoveAll();
}
-void BasePrefsChange::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- DCHECK(type == chrome::NOTIFICATION_PREF_CHANGED);
- const std::string* pref_name = content::Details<std::string>(details).ptr();
- DCHECK(pref_name && pref_observer_.IsObserved(*pref_name));
+void BasePrefsChange::OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) {
+ DCHECK(pref_observer_.IsObserved(pref_name));
// Will delete this instance.
ProtectorServiceFactory::GetForProfile(profile())->DismissChange(this);
}

Powered by Google App Engine
This is Rietveld 408576698