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

Unified Diff: chrome/browser/ui/gesture_prefs_observer_factory_aura.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/ui/gesture_prefs_observer_factory_aura.cc
diff --git a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
index 16fa3efdb345b49ef236593755a09976b2a2198c..5cd51d3a85cbaf8256cc0d74ac5d811254340520 100644
--- a/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
+++ b/chrome/browser/ui/gesture_prefs_observer_factory_aura.cc
@@ -6,6 +6,7 @@
#include "base/compiler_specific.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_dependency_manager.h"
@@ -19,7 +20,7 @@ using ui::GestureConfiguration;
namespace {
// This class manages gesture configuration preferences.
-class GesturePrefsObserver : public content::NotificationObserver,
+class GesturePrefsObserver : public PrefObserver,
public ProfileKeyedService {
public:
explicit GesturePrefsObserver(PrefService* prefs);
@@ -28,10 +29,9 @@ class GesturePrefsObserver : public content::NotificationObserver,
// ProfileKeyedService implementation.
virtual void Shutdown() OVERRIDE;
- // 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;
private:
void Update();
@@ -81,10 +81,8 @@ void GesturePrefsObserver::Shutdown() {
registrar_.RemoveAll();
}
-void GesturePrefsObserver::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
+void GesturePrefsObserver::OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) {
Update();
}
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm ('k') | chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698