Index: chrome/browser/notifications/message_center_settings_controller.cc |
diff --git a/chrome/browser/notifications/message_center_settings_controller.cc b/chrome/browser/notifications/message_center_settings_controller.cc |
index e16109effebd6931280e14530242b4d4ef453c67..b5bcf3b3fa2530045f991d067dfe3e04e781d39d 100644 |
--- a/chrome/browser/notifications/message_center_settings_controller.cc |
+++ b/chrome/browser/notifications/message_center_settings_controller.cc |
@@ -350,8 +350,15 @@ void MessageCenterSettingsController::SetNotifierEnabled( |
<< notifier.notifier_id.url.spec(); |
} |
- if (pattern.IsValid()) |
- DesktopNotificationProfileUtil::ClearSetting(profile, pattern); |
+ if (pattern.IsValid()) { |
+ // Note that we don't use DesktopNotificationProfileUtil::ClearSetting |
+ // here because pattern may from user manual input. |
Bernhard Bauer
2016/03/16 10:25:22
Nit: this subordinate clause no verb 😃. "[...] bec
lshang
2016/03/16 23:56:58
Done.
|
+ HostContentSettingsMapFactory::GetForProfile(profile) |
+ ->SetContentSetting(pattern, ContentSettingsPattern::Wildcard(), |
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS, |
+ content_settings::ResourceIdentifier(), |
+ CONTENT_SETTING_DEFAULT); |
+ } |
} |
} else { |
NotifierStateTrackerFactory::GetForProfile(profile) |