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

Issue 1575623002: Disable Web Notifications in Incognito (Closed)

Created:
4 years, 11 months ago by johnme
Modified:
4 years, 11 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, kcarattini+watch_chromium.org, markusheintz_, mlamouri+watch-permissions_chromium.org, msramek+watch_chromium.org, raymes+watch_chromium.org, tfarina, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@permfix
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/9ed9388c5b6984439ced7abaad2e0900ba526191 Cr-Commit-Position: refs/heads/master@{#369644}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Removed INHERIT_IN_INCOGNITO_EXCEPT_ALLOW #

Total comments: 9

Patch Set 3 : Refactored to avoid changes to PermissionContextBase #

Total comments: 4

Patch Set 4 : Address nit. #

Total comments: 10

Patch Set 5 : Address Peter's comments #

Patch Set 6 : Fix Mac compile by adding is_incognito to WebsiteSettingsUI::PermissionInfo. Also added PermissionMenuModel test. #

Patch Set 7 : Remove obsolete NotificationsTest.TestIncognitoNotification #

Patch Set 8 : No Profile* in WebsiteSettingsPopupView #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+418 lines, -26 lines) Patch
M base/test/test_mock_time_task_runner.h View 1 chunk +3 lines, -0 lines 0 comments Download
M base/test/test_mock_time_task_runner.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/notifications/notification_browsertest.cc View 1 2 3 4 5 6 1 chunk +0 lines, -12 lines 0 comments Download
M chrome/browser/notifications/notification_permission_context.h View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/notifications/notification_permission_context.cc View 1 2 3 4 2 chunks +153 lines, -1 line 0 comments Download
M chrome/browser/notifications/notification_permission_context_unittest.cc View 1 2 3 4 5 3 chunks +205 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/website_settings/permission_selector_button_unittest.mm View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller_unittest.mm View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/views/website_settings/website_settings_popup_view.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 2 comments Download
M chrome/browser/ui/views/website_settings/website_settings_popup_view_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/website_settings/permission_bubble_manager.cc View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/website_settings/permission_menu_model.cc View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/ui/website_settings/permission_menu_model_unittest.cc View 1 2 3 4 5 4 chunks +21 lines, -0 lines 0 comments Download
M chrome/browser/ui/website_settings/website_settings.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/website_settings/website_settings_ui.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/website_settings/website_settings_ui.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M components/content_settings/core/browser/content_settings_registry.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (18 generated)
johnme
phajdan.jr@chromium.org: Please review changes in - base/test/test_mock_time_task_runner.{h,cc} mlamouri@chromium.org: Please review changes in - chrome/browser/permissions/ markusheintz@chromium.org: ...
4 years, 11 months ago (2016-01-08 22:22:51 UTC) #2
raymes
-markusheintz / +palmer for website_settings I had a look at the content_settings part and have ...
4 years, 11 months ago (2016-01-11 00:41:11 UTC) #4
johnme
https://codereview.chromium.org/1575623002/diff/1/components/content_settings/core/browser/content_settings_info.h File components/content_settings/core/browser/content_settings_info.h (right): https://codereview.chromium.org/1575623002/diff/1/components/content_settings/core/browser/content_settings_info.h#newcode36 components/content_settings/core/browser/content_settings_info.h:36: // This is unusual, so seek privacy review before ...
4 years, 11 months ago (2016-01-11 13:53:52 UTC) #5
mlamouri (slow - plz ping)
https://codereview.chromium.org/1575623002/diff/20001/chrome/browser/permissions/permission_context_base.cc File chrome/browser/permissions/permission_context_base.cc (right): https://codereview.chromium.org/1575623002/diff/20001/chrome/browser/permissions/permission_context_base.cc#newcode282 chrome/browser/permissions/permission_context_base.cc:282: // Some permissions are always denied in incognito. To ...
4 years, 11 months ago (2016-01-11 16:03:57 UTC) #7
johnme
https://codereview.chromium.org/1575623002/diff/20001/chrome/browser/permissions/permission_context_base.cc File chrome/browser/permissions/permission_context_base.cc (right): https://codereview.chromium.org/1575623002/diff/20001/chrome/browser/permissions/permission_context_base.cc#newcode282 chrome/browser/permissions/permission_context_base.cc:282: // Some permissions are always denied in incognito. To ...
4 years, 11 months ago (2016-01-11 16:29:20 UTC) #8
johnme
On 2016/01/11 16:29:20, johnme wrote: > https://codereview.chromium.org/1575623002/diff/20001/chrome/browser/permissions/permission_context_base.cc#newcode288 > chrome/browser/permissions/permission_context_base.cc:288: > content_settings_type_); > On 2016/01/11 16:03:57, ...
4 years, 11 months ago (2016-01-11 19:58:10 UTC) #9
palmer
There is still some signal, in that the random delay (whatever interval you choose) will ...
4 years, 11 months ago (2016-01-11 20:28:08 UTC) #10
raymes
Content settings lg with one thought on naming https://codereview.chromium.org/1575623002/diff/20001/components/content_settings/core/browser/content_settings_info.h File components/content_settings/core/browser/content_settings_info.h (right): https://codereview.chromium.org/1575623002/diff/20001/components/content_settings/core/browser/content_settings_info.h#newcode34 components/content_settings/core/browser/content_settings_info.h:34: DENY_IN_INCOGNITO_AFTER_DELAY ...
4 years, 11 months ago (2016-01-12 06:00:41 UTC) #11
johnme
I've refactored this at Mounir's suggestion to avoid changes to PermissionContextBase, and to avoid complicating ...
4 years, 11 months ago (2016-01-12 18:04:52 UTC) #12
johnme
peter@chromium.org: Please review changes in chrome/browser/notifications/
4 years, 11 months ago (2016-01-12 18:08:17 UTC) #14
mlamouri (slow - plz ping)
Looks better! :) You don't need my l-g-t-m but it lgtm none the less :) ...
4 years, 11 months ago (2016-01-12 18:13:15 UTC) #15
johnme
Addressed nit. https://codereview.chromium.org/1575623002/diff/40001/chrome/browser/notifications/notification_permission_context.cc File chrome/browser/notifications/notification_permission_context.cc (right): https://codereview.chromium.org/1575623002/diff/40001/chrome/browser/notifications/notification_permission_context.cc#newcode149 chrome/browser/notifications/notification_permission_context.cc:149: // Notifications is always denied in incognito. ...
4 years, 11 months ago (2016-01-12 18:42:44 UTC) #16
raymes
lgtm. Thanks John!
4 years, 11 months ago (2016-01-12 23:51:39 UTC) #17
Peter Beverloo
lgtm % tests I think we should have a chromestatus.com entry for this, and make ...
4 years, 11 months ago (2016-01-13 01:42:10 UTC) #18
Paweł Hajdan Jr.
base/test LGTM
4 years, 11 months ago (2016-01-13 08:51:49 UTC) #19
johnme
Addressed Peter's review comments - thanks! > I think we should have a chromestatus.com entry ...
4 years, 11 months ago (2016-01-13 20:49:26 UTC) #20
Peter Beverloo
lgtm
4 years, 11 months ago (2016-01-13 22:09:58 UTC) #21
palmer
LGTM
4 years, 11 months ago (2016-01-13 22:16:04 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1575623002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1575623002/80001
4 years, 11 months ago (2016-01-13 22:18:01 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_TIMED_OUT, no build URL) android_chromium_gn_compile_dbg on ...
4 years, 11 months ago (2016-01-14 00:22:22 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1575623002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1575623002/100001
4 years, 11 months ago (2016-01-14 14:47:38 UTC) #29
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/101991)
4 years, 11 months ago (2016-01-14 15:34:19 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1575623002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1575623002/120001
4 years, 11 months ago (2016-01-14 16:17:24 UTC) #36
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-14 17:28:13 UTC) #38
palmer
Still LGTM, % potential NULL deref nit. https://codereview.chromium.org/1575623002/diff/140001/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc File chrome/browser/ui/views/website_settings/website_settings_popup_view.cc (right): https://codereview.chromium.org/1575623002/diff/140001/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc#newcode594 chrome/browser/ui/views/website_settings/website_settings_popup_view.cc:594: Profile::FromBrowserContext(web_contents_->GetBrowserContext()) I ...
4 years, 11 months ago (2016-01-14 19:26:19 UTC) #39
johnme
https://codereview.chromium.org/1575623002/diff/140001/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc File chrome/browser/ui/views/website_settings/website_settings_popup_view.cc (right): https://codereview.chromium.org/1575623002/diff/140001/chrome/browser/ui/views/website_settings/website_settings_popup_view.cc#newcode594 chrome/browser/ui/views/website_settings/website_settings_popup_view.cc:594: Profile::FromBrowserContext(web_contents_->GetBrowserContext()) On 2016/01/14 19:26:19, palmer wrote: > I *think* ...
4 years, 11 months ago (2016-01-14 23:34:48 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1575623002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1575623002/140001
4 years, 11 months ago (2016-01-14 23:35:43 UTC) #43
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 11 months ago (2016-01-15 01:13:37 UTC) #45
commit-bot: I haz the power
4 years, 11 months ago (2016-01-15 01:14:41 UTC) #47
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/9ed9388c5b6984439ced7abaad2e0900ba526191
Cr-Commit-Position: refs/heads/master@{#369644}

Powered by Google App Engine
This is Rietveld 408576698