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..6eac09b551154cbd8003f8466a8e9f0278209b71 100644 |
--- a/chrome/browser/notifications/message_center_settings_controller.cc |
+++ b/chrome/browser/notifications/message_center_settings_controller.cc |
@@ -350,8 +350,16 @@ 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 might be from user manual input and not match |
+ // the default one used by ClearSetting(). |
+ HostContentSettingsMapFactory::GetForProfile(profile) |
+ ->SetContentSetting(pattern, ContentSettingsPattern::Wildcard(), |
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS, |
+ content_settings::ResourceIdentifier(), |
+ CONTENT_SETTING_DEFAULT); |
+ } |
} |
} else { |
NotifierStateTrackerFactory::GetForProfile(profile) |