commit | 9ed9388c5b6984439ced7abaad2e0900ba526191 | [log] [tgz] |
---|---|---|
author | johnme <[email protected]> | Fri Jan 15 01:13:28 2016 |
committer | Commit bot <[email protected]> | Fri Jan 15 01:14:33 2016 |
tree | 4f918bee2e2120c61eb2196becd050a05a332258 | |
parent | 03a9d96a42856ae5e733c3086fdde7d8b2ce10e8 [diff] [blame] |
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}
diff --git a/chrome/browser/ui/website_settings/website_settings.cc b/chrome/browser/ui/website_settings/website_settings.cc index dfc92c8..6f817da7 100644 --- a/chrome/browser/ui/website_settings/website_settings.cc +++ b/chrome/browser/ui/website_settings/website_settings.cc
@@ -699,6 +699,7 @@ } permission_info.source = info.source; + permission_info.is_incognito = profile_->IsOffTheRecord(); if (info.primary_pattern == ContentSettingsPattern::Wildcard() && info.secondary_pattern == ContentSettingsPattern::Wildcard()) {