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

Unified Diff: chrome/browser/content_settings/permission_queue_controller.cc

Issue 593153002: Restore the iframe behavior of notification permissions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/content_settings/permission_queue_controller.cc
diff --git a/chrome/browser/content_settings/permission_queue_controller.cc b/chrome/browser/content_settings/permission_queue_controller.cc
index 191e0850196f26c4d30fd0cc7ef8449c015a0138..c97b6255ed0acf4e682810176c603f916cf003f5 100644
--- a/chrome/browser/content_settings/permission_queue_controller.cc
+++ b/chrome/browser/content_settings/permission_queue_controller.cc
@@ -369,9 +369,15 @@ void PermissionQueueController::UpdateContentSetting(
ContentSetting content_setting =
allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK;
+
+ ContentSettingsPattern embedder_pattern =
+ (type_ == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) ?
+ ContentSettingsPattern::Wildcard() :
+ ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin());
+
profile_->GetHostContentSettingsMap()->SetContentSetting(
ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()),
- ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()),
+ embedder_pattern,
type_,
std::string(),
content_setting);
« no previous file with comments | « chrome/browser/content_settings/permission_context_base.h ('k') | chrome/browser/notifications/desktop_notification_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698