Index: chrome/browser/ui/views/options/content_filter_page_view.cc |
diff --git a/chrome/browser/ui/views/options/content_filter_page_view.cc b/chrome/browser/ui/views/options/content_filter_page_view.cc |
index d331540973c4a19b3a1ae1d9a89de741cbe8ff75..3e4ba8d8a6b30cf0dee6cb9da11beba583cd210f 100644 |
--- a/chrome/browser/ui/views/options/content_filter_page_view.cc |
+++ b/chrome/browser/ui/views/options/content_filter_page_view.cc |
@@ -153,6 +153,10 @@ void ContentFilterPageView::InitControlLayout() { |
registrar_.Add(this, NotificationType::CONTENT_SETTINGS_CHANGED, |
NotificationService::AllSources()); |
+ registrar_.Add(this, NotificationType::DESKTOP_NOTIFICATION_DEFAULT_CHANGED, |
+ NotificationService::AllSources()); |
+ registrar_.Add(this, NotificationType::GEOLOCATION_SETTINGS_CHANGED, |
+ NotificationService::AllSources()); |
} |
/////////////////////////////////////////////////////////////////////////////// |
@@ -163,9 +167,13 @@ void ContentFilterPageView::UpdateView() { |
if (content_type_ == CONTENT_SETTINGS_TYPE_GEOLOCATION) { |
default_setting = profile()->GetGeolocationContentSettingsMap()-> |
GetDefaultContentSetting(); |
+ is_content_type_managed = profile()->GetGeolocationContentSettingsMap()-> |
+ IsDefaultContentSettingManaged(); |
} else if (content_type_ == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) { |
default_setting = profile()->GetDesktopNotificationService()-> |
GetDefaultContentSetting(); |
+ is_content_type_managed = profile()->GetDesktopNotificationService()-> |
+ IsDefaultContentSettingManaged(); |
} else { |
default_setting = profile()->GetHostContentSettingsMap()-> |
GetDefaultContentSetting(content_type_); |
@@ -267,6 +275,15 @@ void ContentFilterPageView::Observe(NotificationType type, |
if (type == NotificationType::CONTENT_SETTINGS_CHANGED) { |
NotifyContentSettingsChanged( |
Details<ContentSettingsDetails>(details).ptr()); |
+ } else if (type == NotificationType::GEOLOCATION_SETTINGS_CHANGED) { |
+ NotifyContentSettingsChanged( |
+ Details<ContentSettingsDetails>(details).ptr()); |
+ } else if (type == NotificationType::DESKTOP_NOTIFICATION_DEFAULT_CHANGED) { |
+ ContentSettingsDetails content_settings_details( |
+ ContentSettingsPattern(), |
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS, |
+ ""); |
+ NotifyContentSettingsChanged(&content_settings_details); |
} else { |
OptionsPageBase::Observe(type, source, details); |
} |