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

Unified Diff: chrome/browser/ui/webui/options/media_galleries_handler.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/ui/webui/options/media_galleries_handler.cc
diff --git a/chrome/browser/ui/webui/options/media_galleries_handler.cc b/chrome/browser/ui/webui/options/media_galleries_handler.cc
index 903712f0b4200454d6467014a05387e94dd128bf..072dd7b131fd323ee2a3e0a3b06a7a0af8e10b6b 100644
--- a/chrome/browser/ui/webui/options/media_galleries_handler.cc
+++ b/chrome/browser/ui/webui/options/media_galleries_handler.cc
@@ -130,17 +130,10 @@ void MediaGalleriesHandler::FileSelected(
prefs->AddGalleryByPath(path);
}
-void MediaGalleriesHandler::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_PREF_CHANGED &&
- *content::Details<std::string>(details).ptr() ==
- prefs::kMediaGalleriesRememberedGalleries) {
- OnGalleriesChanged();
- } else {
- NOTREACHED();
- }
+void MediaGalleriesHandler::OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) {
+ DCHECK_EQ(std::string(prefs::kMediaGalleriesRememberedGalleries), pref_name);
+ OnGalleriesChanged();
}
} // namespace options

Powered by Google App Engine
This is Rietveld 408576698