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

Unified Diff: components/content_settings/core/browser/host_content_settings_map.cc

Issue 1575623002: Disable Web Notifications in Incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permfix
Patch Set: Removed INHERIT_IN_INCOGNITO_EXCEPT_ALLOW Created 4 years, 11 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: components/content_settings/core/browser/host_content_settings_map.cc
diff --git a/components/content_settings/core/browser/host_content_settings_map.cc b/components/content_settings/core/browser/host_content_settings_map.cc
index fd9cbbf37d03f61f0e2e1c75163c2d63f0875b0d..bf572dff210ecd1bfed748311ccb79ec92b2c857 100644
--- a/components/content_settings/core/browser/host_content_settings_map.cc
+++ b/components/content_settings/core/browser/host_content_settings_map.cc
@@ -71,7 +71,7 @@ bool SchemeCanBeWhitelisted(const std::string& scheme) {
scheme == content_settings::kChromeUIScheme;
}
-// Prevents content settings marked INHERIT_IN_INCOGNITO_EXCEPT_ALLOW from
+// Prevents content settings marked DENY_IN_INCOGNITO_AFTER_DELAY from
// inheriting CONTENT_SETTING_ALLOW settings from regular to incognito.
scoped_ptr<base::Value> CoerceSettingInheritedToIncognito(
ContentSettingsType content_type,
@@ -79,11 +79,11 @@ scoped_ptr<base::Value> CoerceSettingInheritedToIncognito(
const content_settings::ContentSettingsInfo* info =
content_settings::ContentSettingsRegistry::GetInstance()->Get(
content_type);
- if (!info)
- return value;
- if (info->incognito_behavior() !=
- content_settings::ContentSettingsInfo::INHERIT_IN_INCOGNITO_EXCEPT_ALLOW)
+ if (!info ||
+ info->incognito_behavior() ==
+ content_settings::ContentSettingsInfo::INHERIT_IN_INCOGNITO) {
return value;
+ }
ContentSetting setting = content_settings::ValueToContentSetting(value.get());
if (setting != CONTENT_SETTING_ALLOW)
return value;

Powered by Google App Engine
This is Rietveld 408576698