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

Unified Diff: components/content_settings/core/browser/content_settings_registry.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/content_settings_registry.cc
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc
index c16c7830755e6d940cde67325019a5a63fbc0457..d74a1910455a1ed1634aac0d7d0f7905142d00e0 100644
--- a/components/content_settings/core/browser/content_settings_registry.cc
+++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -173,7 +173,7 @@ void ContentSettingsRegistry::Init() {
ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK,
CONTENT_SETTING_ASK),
WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE,
- ContentSettingsInfo::INHERIT_IN_INCOGNITO_EXCEPT_ALLOW);
+ ContentSettingsInfo::DENY_IN_INCOGNITO_AFTER_DELAY);
Register(CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen", CONTENT_SETTING_ASK,
WebsiteSettingsInfo::SYNCABLE,
@@ -236,7 +236,7 @@ void ContentSettingsRegistry::Init() {
ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK,
CONTENT_SETTING_ASK),
WebsiteSettingsInfo::REQUESTING_ORIGIN_AND_TOP_LEVEL_ORIGIN_SCOPE,
- ContentSettingsInfo::INHERIT_IN_INCOGNITO_EXCEPT_ALLOW);
+ ContentSettingsInfo::DENY_IN_INCOGNITO_AFTER_DELAY);
#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
Register(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER,
@@ -290,10 +290,9 @@ void ContentSettingsRegistry::Register(
ContentSettingsInfo::IncognitoBehavior incognito_behavior) {
// Ensure that nothing has been registered yet for the given type.
DCHECK(!website_settings_registry_->Get(type));
- DCHECK(incognito_behavior
- != ContentSettingsInfo::INHERIT_IN_INCOGNITO_EXCEPT_ALLOW
- || ContainsKey(valid_settings, CONTENT_SETTING_ASK))
- << "If INHERIT_IN_INCOGNITO_EXCEPT_ALLOW is set, ASK must be listed as a "
+ DCHECK(incognito_behavior == ContentSettingsInfo::INHERIT_IN_INCOGNITO ||
+ ContainsKey(valid_settings, CONTENT_SETTING_ASK))
+ << "If DENY_IN_INCOGNITO_AFTER_DELAY is set, ASK must be listed as a "
"valid setting.";
scoped_ptr<base::Value> default_value(
new base::FundamentalValue(static_cast<int>(initial_default_value)));

Powered by Google App Engine
This is Rietveld 408576698