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

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: 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..d984461090f5e70ff661a410b7f0fdd050014acd 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,
@@ -290,11 +290,10 @@ 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 "
- "valid setting.";
+ DCHECK(incognito_behavior == ContentSettingsInfo::INHERIT_IN_INCOGNITO ||
+ ContainsKey(valid_settings, CONTENT_SETTING_ASK))
+ << "If INHERIT_IN_INCOGNITO_EXCEPT_ALLOW or 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)));
const WebsiteSettingsInfo* website_settings_info =

Powered by Google App Engine
This is Rietveld 408576698