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

Unified Diff: chrome/browser/ui/webui/options/content_settings_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 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/webui/options/content_settings_handler.cc
diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc
index c8ad7a67e35e38b93514066e76a6b1261352e4de..f2565aa1442bb7297c7d5a786f013dc5fb8dfbcf 100644
--- a/chrome/browser/ui/webui/options/content_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
@@ -540,17 +540,6 @@ void ContentSettingsHandler::Observe(
break;
}
- case chrome::NOTIFICATION_PREF_CHANGED: {
- const std::string& pref_name =
- *content::Details<std::string>(details).ptr();
- if (pref_name == prefs::kGeolocationContentSettings)
- UpdateGeolocationExceptionsView();
- else if (pref_name == prefs::kPepperFlashSettingsEnabled)
- RefreshFlashSettingsCache(false);
-
- break;
- }
-
case chrome::NOTIFICATION_DESKTOP_NOTIFICATION_SETTINGS_CHANGED: {
UpdateNotificationExceptionsView();
break;
@@ -566,6 +555,14 @@ void ContentSettingsHandler::Observe(
}
}
+void ContentSettingsHandler::OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) {
+ if (pref_name == prefs::kGeolocationContentSettings)
+ UpdateGeolocationExceptionsView();
+ else if (pref_name == prefs::kPepperFlashSettingsEnabled)
+ RefreshFlashSettingsCache(false);
+}
+
void ContentSettingsHandler::OnGetPermissionSettingsCompleted(
uint32 request_id,
bool success,
« no previous file with comments | « chrome/browser/ui/webui/options/content_settings_handler.h ('k') | chrome/browser/ui/webui/options/core_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698