New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 766854 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Migrate NotificationJobService from JobScheduler to BackgroundTaskScheduler

Project Member Reported by fgor...@chromium.org, Sep 19 2017

Issue description

In order to make code consistent across all components scheduling in the background, please migrate the NotificationJobService to BackgroundTaskScheduler.

Good examples are already available in offline pages and prefetch.

Bonus points: NotificationJobService will also work on pre-M versions.
 

Comment 1 by peter@chromium.org, Sep 20 2017

Owner: awdf@chromium.org
Status: Assigned (was: Untriaged)
We should definitely move NotificationJobService to the BackgroundTaskScheduler, but only on N onward. Anita, would you mind taking a look?

The reason behind not doing this on older versions is that we "schedule" this task in response to notification interaction intents, which we have to execute as soon as possible. Prior to N we didn't need to schedule at all, as this only became a necessity due to Background Check. In addition, prior to N the Job Scheduler didn't prioritise events caused by user interaction, so it might introduce unnecessary delays.
Components: Internals>BackgroundTaskScheduler

Comment 3 by awdf@chromium.org, Nov 20 2017

Owner: peter@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 21 2017

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

commit 64337af3fa6a5ed60960b65a70ca8ba060483cc4
Author: Peter Beverloo <peter@chromium.org>
Date: Tue Nov 21 18:04:02 2017

Let Notification Handlers report when event handling has completed

This will significantly help reduce flakiness in testing (one deflake
included in this CL), and is required for migrating Android's intent
handling system to the BackgroundTaskScheduler which needs to know when
handling of the event has finished.

In addition, a hack where the NativeNotificationDisplayService invoked
the Close() method on a notification's delegate in order to fire the
event for non-persistent Web Notifications has been removed. We can just
fire the event from the NotificationMessageFilter instead.

BUG=766854,  784951 

Change-Id: I57d0a446e6c47281bb7b5e001c449fadddeba571
Reviewed-on: https://chromium-review.googlesource.com/779722
Commit-Queue: Peter Beverloo <peter@chromium.org>
Reviewed-by: Anita Woodruff <awdf@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518305}
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/BUILD.gn
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/download/notification/download_notification_manager.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/extensions/api/notifications/extension_notification_handler.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/extensions/api/notifications/extension_notification_handler.h
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/extensions/api/notifications/extension_notification_handler_unittest.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/native_notification_display_service.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/non_persistent_notification_handler.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/non_persistent_notification_handler.h
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/notification_display_service.cc
[add] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/notification_handler.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/notification_handler.h
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/persistent_notification_handler.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/persistent_notification_handler.h
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/platform_notification_service_impl.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/platform_notification_service_impl.h
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/platform_notification_service_interactive_uitest.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/platform_notification_service_unittest.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/stub_notification_display_service.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/notifications/stub_notification_display_service.h
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/chrome/browser/push_messaging/push_messaging_notification_manager.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/content/browser/notifications/notification_event_dispatcher_impl.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/content/browser/notifications/notification_event_dispatcher_impl.h
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/content/browser/notifications/notification_message_filter.cc
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/content/public/browser/notification_event_dispatcher.h
[modify] https://crrev.com/64337af3fa6a5ed60960b65a70ca8ba060483cc4/content/test/mock_platform_notification_service.cc

Sign in to add a comment