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

Unified Diff: chrome/browser/notifications/message_center_settings_controller.cc

Issue 1694923004: Use GURLs instead of patterns in SetContentSetting in notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scoping_set_content_setting
Patch Set: recover ClearSetting() for user input patterns to use SetContentSetting() directly Created 4 years, 9 months 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/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..6cb9532ddb069960932a826e59047a16c300861e 100644
--- a/chrome/browser/notifications/message_center_settings_controller.cc
+++ b/chrome/browser/notifications/message_center_settings_controller.cc
@@ -351,7 +351,11 @@ void MessageCenterSettingsController::SetNotifierEnabled(
}
if (pattern.IsValid())
raymes 2016/03/16 03:17:45 nit: {} Also, I think we should add a comment her
lshang 2016/03/16 04:59:14 Done.
- DesktopNotificationProfileUtil::ClearSetting(profile, pattern);
+ HostContentSettingsMapFactory::GetForProfile(profile)
+ ->SetContentSetting(pattern, ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
+ content_settings::ResourceIdentifier(),
+ CONTENT_SETTING_DEFAULT);
}
} else {
NotifierStateTrackerFactory::GetForProfile(profile)

Powered by Google App Engine
This is Rietveld 408576698