| 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 145061e32bb5200ac4e2c28bd60dacc9ff11d71e..50612e65c795b50524975ce3b79e338e3f231714 100644
|
| --- a/chrome/browser/ui/webui/options/content_settings_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/content_settings_handler.cc
|
| @@ -677,15 +677,9 @@ std::string ContentSettingsHandler::GetSettingDefaultFromModel(
|
| ContentSettingsType type, std::string* provider_id) {
|
| Profile* profile = Profile::FromWebUI(web_ui());
|
| ContentSetting default_setting;
|
| - if (type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) {
|
| - default_setting =
|
| - DesktopNotificationServiceFactory::GetForProfile(profile)->
|
| - GetDefaultContentSetting(provider_id);
|
| - } else {
|
| - default_setting =
|
| - profile->GetHostContentSettingsMap()->
|
| - GetDefaultContentSetting(type, provider_id);
|
| - }
|
| + default_setting =
|
| + profile->GetHostContentSettingsMap()->
|
| + GetDefaultContentSetting(type, provider_id);
|
|
|
| return ContentSettingToString(default_setting);
|
| }
|
| @@ -1170,8 +1164,12 @@ void ContentSettingsHandler::RemoveNotificationException(
|
|
|
| DCHECK(content_setting == CONTENT_SETTING_ALLOW ||
|
| content_setting == CONTENT_SETTING_BLOCK);
|
| - DesktopNotificationServiceFactory::GetForProfile(profile)->
|
| - ClearSetting(ContentSettingsPattern::FromString(origin));
|
| + profile->GetHostContentSettingsMap()->SetContentSetting(
|
| + ContentSettingsPattern::FromString(origin),
|
| + ContentSettingsPattern::Wildcard(),
|
| + CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
|
| + NO_RESOURCE_IDENTIFIER,
|
| + CONTENT_SETTING_DEFAULT);
|
| }
|
|
|
| void ContentSettingsHandler::RemoveMediaException(const base::ListValue* args) {
|
| @@ -1313,14 +1311,11 @@ void ContentSettingsHandler::SetContentFilter(const base::ListValue* args) {
|
| profile = profile->GetOriginalProfile();
|
| #endif
|
|
|
| - if (content_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) {
|
| - DesktopNotificationServiceFactory::GetForProfile(profile)->
|
| - SetDefaultContentSetting(default_setting);
|
| - } else {
|
| - HostContentSettingsMap* map = profile->GetHostContentSettingsMap();
|
| - ApplyWhitelist(content_type, default_setting);
|
| - map->SetDefaultContentSetting(content_type, default_setting);
|
| - }
|
| +
|
| + HostContentSettingsMap* map = profile->GetHostContentSettingsMap();
|
| + ApplyWhitelist(content_type, default_setting);
|
| + map->SetDefaultContentSetting(content_type, default_setting);
|
| +
|
| switch (content_type) {
|
| case CONTENT_SETTINGS_TYPE_COOKIES:
|
| content::RecordAction(
|
|
|