diff options
author | johnme <johnme@chromium.org> | 2016-01-14 17:13:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-15 01:14:33 +0000 |
commit | 9ed9388c5b6984439ced7abaad2e0900ba526191 (patch) | |
tree | 4f918bee2e2120c61eb2196becd050a05a332258 /components/content_settings | |
parent | 03a9d96a42856ae5e733c3086fdde7d8b2ce10e8 (diff) | |
download | chromium_src-9ed9388c5b6984439ced7abaad2e0900ba526191.zip chromium_src-9ed9388c5b6984439ced7abaad2e0900ba526191.tar.gz chromium_src-9ed9388c5b6984439ced7abaad2e0900ba526191.tar.bz2 |
Disable Web Notifications in Incognito
Requests for notifications (and hence push messaging) permissions in
incognito will be auto-denied after a random 1-2 second delay.
This prevents websites from detecting incognito mode, by observing
that notifications are available in incognito but push messaging is not
(until https://crbug.com/401439 is implemented).
Depends on:
- https://codereview.chromium.org/1442083002
Known caveat: Prevents legitimate use of notifications in incognito :(
BUG=479679,542081
Review URL: https://codereview.chromium.org/1575623002
Cr-Commit-Position: refs/heads/master@{#369644}
Diffstat (limited to 'components/content_settings')
-rw-r--r-- | components/content_settings/core/browser/content_settings_registry.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc index c16c783..34510e3 100644 --- a/components/content_settings/core/browser/content_settings_registry.cc +++ b/components/content_settings/core/browser/content_settings_registry.cc @@ -173,6 +173,8 @@ void ContentSettingsRegistry::Init() { ValidSettings(CONTENT_SETTING_ALLOW, CONTENT_SETTING_BLOCK, CONTENT_SETTING_ASK), WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE, + // See also NotificationPermissionContext::DecidePermission which + // implements additional incognito exceptions. ContentSettingsInfo::INHERIT_IN_INCOGNITO_EXCEPT_ALLOW); Register(CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen", CONTENT_SETTING_ASK, |