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

Issue 2935333003: Propagate the user gesture bit when requesting push messaging permission. (Closed)

Created:
3 years, 6 months ago by dominickn
Modified:
3 years, 6 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, Peter Beverloo, johnme+watch_chromium.org, blink-reviews, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, dglazkov+blink, darin-cc_chromium.org, awdf+watch_chromium.org, haraken, einbinder+watch-test-runner_chromium.org, darin (slow to review), blink-reviews-api_chromium.org, jochen+watch_chromium.org, mlamouri+watch-test-runner_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Propagate the user gesture bit when requesting push messaging permission. Currently, directly subscribing to push messages without having previously been granted notifications permissions results in a permission prompt to the user. This prompt is hardcoded to always tell the permissions layer that it was made by a user gesture, which may or may not be the case. This CL plumbs the user gesture bit from the renderer to the browser when PushManager.subscribe() is called. This means permission metrics for push will now have the correct values recorded for the user gesture bit. BUG=733483 Review-Url: https://codereview.chromium.org/2935333003 Cr-Commit-Position: refs/heads/master@{#479965} Committed: https://chromium.googlesource.com/chromium/src/+/6ba3fa621ea462377f2d6f189ae1eb186f9cae16

Patch Set 1 #

Patch Set 2 : ThreadSafe user gesture check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -11 lines) Patch
M chrome/browser/push_messaging/push_messaging_service_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_service_impl.cc View 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/push_messaging/push_messaging_manager.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/push_messaging/push_messaging_manager.cc View 5 chunks +7 lines, -2 lines 0 comments Download
M content/child/push_messaging/push_provider.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/child/push_messaging/push_provider.cc View 2 chunks +2 lines, -1 line 0 comments Download
M content/common/push_messaging.mojom View 1 chunk +2 lines, -1 line 0 comments Download
M content/public/browser/push_messaging_service.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/push_messaging/push_messaging_client.h View 2 chunks +3 lines, -0 lines 0 comments Download
M content/renderer/push_messaging/push_messaging_client.cc View 5 chunks +10 lines, -6 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_push_messaging_service.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_push_messaging_service.cc View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/push_messaging/PushManager.cpp View 1 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/push_messaging/WebPushClient.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/push_messaging/WebPushProvider.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 24 (16 generated)
dominickn
PTAL, thanks!
3 years, 6 months ago (2017-06-15 07:24:48 UTC) #9
Peter Beverloo
lgtm
3 years, 6 months ago (2017-06-15 13:46:05 UTC) #13
dominickn
Thanks! +estark for mojom security review
3 years, 6 months ago (2017-06-15 22:37:21 UTC) #15
dominickn
Also +kinuko for content/public and content/child
3 years, 6 months ago (2017-06-15 22:41:19 UTC) #17
estark
mojom lgtm
3 years, 6 months ago (2017-06-16 05:07:14 UTC) #18
kinuko
lgtm
3 years, 6 months ago (2017-06-16 06:08:24 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2935333003/20001
3 years, 6 months ago (2017-06-16 06:11:07 UTC) #21
commit-bot: I haz the power
3 years, 6 months ago (2017-06-16 06:15:04 UTC) #24
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/6ba3fa621ea462377f2d6f189ae1...

Powered by Google App Engine
This is Rietveld 408576698