New issue
Advanced search Search tips

Issue 733483 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Subscribing to push messaging does not propagate the user gesture bit to the permission manager

Project Member Reported by dominickn@chromium.org, Jun 15 2017

Issue description

When websites directly use PushManager.subscribe() (instead of first requesting notifications permission), the push code calls to the permissions layer to requesting PUSH_MESSAGING permission. It hard codes "true" for the user gesture bit, which skews our metrics for push.

This should be fixed to correctly plumb the user gesture bit from the renderer up to the browser for making the permissions call.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ba3fa621ea462377f2d6f189ae1eb186f9cae16

commit 6ba3fa621ea462377f2d6f189ae1eb186f9cae16
Author: dominickn <dominickn@chromium.org>
Date: Fri Jun 16 06:14:46 2017

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}

[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/chrome/browser/push_messaging/push_messaging_service_impl.cc
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/chrome/browser/push_messaging/push_messaging_service_impl.h
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/content/browser/push_messaging/push_messaging_manager.cc
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/content/browser/push_messaging/push_messaging_manager.h
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/content/child/push_messaging/push_provider.cc
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/content/child/push_messaging/push_provider.h
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/content/common/push_messaging.mojom
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/content/public/browser/push_messaging_service.h
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/content/renderer/push_messaging/push_messaging_client.cc
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/content/renderer/push_messaging/push_messaging_client.h
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/content/shell/browser/layout_test/layout_test_push_messaging_service.cc
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/content/shell/browser/layout_test/layout_test_push_messaging_service.h
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/third_party/WebKit/public/platform/modules/push_messaging/WebPushClient.h
[modify] https://crrev.com/6ba3fa621ea462377f2d6f189ae1eb186f9cae16/third_party/WebKit/public/platform/modules/push_messaging/WebPushProvider.h

Status: Fixed (was: Started)

Sign in to add a comment