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

Unified Diff: chrome/browser/chromeos/preferences.cc

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PrefNotifierImpl 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/chromeos/preferences.cc
diff --git a/chrome/browser/chromeos/preferences.cc b/chrome/browser/chromeos/preferences.cc
index f711a802fd3cd36b0022275b30cb64e443b44a6c..061d84ae951c2d2d49a52ccb9b50d35e66338f19 100644
--- a/chrome/browser/chromeos/preferences.cc
+++ b/chrome/browser/chromeos/preferences.cc
@@ -30,8 +30,6 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/public/browser/notification_details.h"
-#include "content/public/browser/notification_source.h"
#include "googleurl/src/gurl.h"
#include "ui/base/events/event_constants.h"
#include "unicode/timezone.h"
@@ -386,11 +384,9 @@ void Preferences::SetInputMethodListForTesting() {
SetInputMethodList();
}
-void Preferences::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_PREF_CHANGED)
- NotifyPrefChanged(content::Details<std::string>(details).ptr());
+void Preferences::OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) {
+ NotifyPrefChanged(&pref_name);
}
void Preferences::NotifyPrefChanged(const std::string* pref_name) {

Powered by Google App Engine
This is Rietveld 408576698