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

Unified Diff: chrome/browser/media_gallery/media_file_system_registry.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/media_gallery/media_file_system_registry.cc
diff --git a/chrome/browser/media_gallery/media_file_system_registry.cc b/chrome/browser/media_gallery/media_file_system_registry.cc
index bd1ece30b3550ac60d0b49eb9edf88379e1b3bc9..030cb4bb77d7a7c314daf25bcedc9e99774afe6f 100644
--- a/chrome/browser/media_gallery/media_file_system_registry.cc
+++ b/chrome/browser/media_gallery/media_file_system_registry.cc
@@ -35,6 +35,7 @@
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
@@ -678,17 +679,12 @@ MediaFileSystemRegistry::~MediaFileSystemRegistry() {
system_monitor->RemoveDevicesChangedObserver(this);
}
-void MediaFileSystemRegistry::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- DCHECK_EQ(chrome::NOTIFICATION_PREF_CHANGED, type);
- const std::string& pref_name =
- *content::Details<std::string>(details).ptr();
+void MediaFileSystemRegistry::OnPreferenceChanged(
+ PrefServiceBase* prefs,
+ const std::string& pref_name) {
DCHECK_EQ(std::string(prefs::kMediaGalleriesRememberedGalleries), pref_name);
// Find the Profile that contains the source PrefService.
- PrefService* prefs = content::Source<PrefService>(source).ptr();
PrefChangeRegistrarMap::iterator pref_change_it =
pref_change_registrar_map_.begin();
for (; pref_change_it != pref_change_registrar_map_.end(); ++pref_change_it) {
« no previous file with comments | « chrome/browser/media_gallery/media_file_system_registry.h ('k') | chrome/browser/net/chrome_url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698