New issue
Advanced search Search tips

Issue 802380 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocked on:
issue 758553



Sign in to add a comment

Fully deprecate the 'Sites' notification channel

Project Member Reported by awdf@chromium.org, Jan 16 2018

Issue description

Since the site-specific channels feature was turned on by default, notifications are only posted to the generic 'Sites' channel if the site-specific channel could not be found*, as a fallback.

However, this should not be necessary, since notification permission is checked whenever a notification is to be displayed, and notification permission for a site on Android O+ is only reported as 'granted' if a site-specific notification channel exists and is enabled.

The remaining thing to decide is whether to put in any mitigations in case for some unexpected reason a channel *doesn't* actually exist for the site.

We should probably at least add an 'assert' that the channel is not null here before using it, for better traces in debug builds:

https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/SiteChannelsManager.java?q=SiteChannelsMan&sq=package:chromium&l=183

Other ideas include:

1. Send ourselves UMA if this codepath is being used
  - downside: it will take a long time for this UMA to reach stable and tell us anything useful

2. Fall back to another channel, e.g. the 'Browser' channel.
  - downside: Probably not good to label something coming from a site as coming from the browser

*Or if the kSiteNotificationChannels feature flag is disabled, but this flag will shortly be removed in https://crrev.com/c/868654
 

Comment 1 by awdf@chromium.org, Jan 16 2018

@peter - I know we discussed falling back to a 'General' generic channel, but I was mistaken - there is no generic 'General' channel, there is only a 'General' channel *group*, of which the Browser channel is a member.
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 1

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

commit 8bd8ecd03ce7e441e39de708551a9c7a6ed81322
Author: Anita Woodruff <awdf@chromium.org>
Date: Wed Aug 01 20:04:40 2018

[Android Notification Channels] Record when sites channel is used

- This is a precursor to removing the generic 'Sites' notification
channel - now that we should have a specific site channel for each
origin with notification permission, the sites channel should never be
used, but adding UMA to verify this.

Bug: 802380
Change-Id: I911b569dad291a4a9f01530f1185adc4dbcaa41e
Reviewed-on: https://chromium-review.googlesource.com/1159020
Commit-Queue: Anita Woodruff <awdf@chromium.org>
Commit-Queue: Peter Beverloo <peter@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579912}
[modify] https://crrev.com/8bd8ecd03ce7e441e39de708551a9c7a6ed81322/chrome/android/java/src/org/chromium/chrome/browser/notifications/channels/SiteChannelsManager.java
[modify] https://crrev.com/8bd8ecd03ce7e441e39de708551a9c7a6ed81322/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/channels/SiteChannelsManagerTest.java
[modify] https://crrev.com/8bd8ecd03ce7e441e39de708551a9c7a6ed81322/tools/metrics/histograms/histograms.xml

Status: Assigned (was: Available)
Owner: peter@chromium.org

Sign in to add a comment