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

Unified Diff: chrome/browser/ui/webui/options/media_galleries_handler.h

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/ui/webui/options/media_galleries_handler.h
diff --git a/chrome/browser/ui/webui/options/media_galleries_handler.h b/chrome/browser/ui/webui/options/media_galleries_handler.h
index 451a37ddaff56754979ca45881a208900ef76da4..7ce549bd9d42ceaaad5eb0cf1fc61ab9fd81f696 100644
--- a/chrome/browser/ui/webui/options/media_galleries_handler.h
+++ b/chrome/browser/ui/webui/options/media_galleries_handler.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_WEBUI_OPTIONS_MEDIA_GALLERIES_HANDLER_H_
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
#include "content/public/browser/notification_observer.h"
#include "ui/base/dialogs/select_file_dialog.h"
@@ -14,6 +15,7 @@ namespace options {
// Handles messages related to adding or removing media galleries.
class MediaGalleriesHandler : public OptionsPageUIHandler,
+ public PrefObserver,
public ui::SelectFileDialog::Listener {
public:
MediaGalleriesHandler();
@@ -28,10 +30,9 @@ class MediaGalleriesHandler : public OptionsPageUIHandler,
virtual void FileSelected(const FilePath& path, int index, void* params)
OVERRIDE;
- // 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:
// Handles the "addNewGallery" message (no arguments).

Powered by Google App Engine
This is Rietveld 408576698