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

Unified Diff: chrome/browser/notifications/notification_ui_manager_impl.h

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/notifications/notification_ui_manager_impl.h
diff --git a/chrome/browser/notifications/notification_ui_manager_impl.h b/chrome/browser/notifications/notification_ui_manager_impl.h
index e3136228aec1e55985c34e99e9a1de6542d50722..0adebdfb88b4cf1f738ab7751ef8ceb4884d98ce 100644
--- a/chrome/browser/notifications/notification_ui_manager_impl.h
+++ b/chrome/browser/notifications/notification_ui_manager_impl.h
@@ -11,6 +11,7 @@
#include "base/id_map.h"
#include "base/memory/scoped_ptr.h"
+#include "base/prefs/public/pref_observer.h"
#include "base/timer.h"
#include "chrome/browser/api/prefs/pref_member.h"
#include "chrome/browser/notifications/balloon.h"
@@ -31,7 +32,8 @@ class NotificationUIManagerImpl
: public NotificationUIManager,
public NotificationPrefsManager,
public BalloonCollection::BalloonSpaceChangeListener,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public PrefObserver {
public:
explicit NotificationUIManagerImpl(PrefService* local_state);
virtual ~NotificationUIManagerImpl();
@@ -63,6 +65,10 @@ class NotificationUIManagerImpl
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver override.
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
+
// Attempts to display notifications from the show_queue if the user
// is active.
void CheckAndShowNotifications();

Powered by Google App Engine
This is Rietveld 408576698