Create DownloadBroadcastManager to handle communication to native

Desktop / Chromium - Joy Ming [] - 9 August 2017 12:51 EDT

This is part of a larger refactor to make downloads a foreground service. This handles the propagation of notification interaction to native. Before, the path was DownloadBroadcastReceiver-> DownloadNotificationService->native. This CL takes the logic relating to spinning up and communicating to the native out of the DownloadNotificationService and into DownloadBroadcastManager, making the path DBR->DNS->DBM->native. The reason this still routes through the DownloadNotificationService is because currently DNS still handles some non-native logic (ie. updating the notifications). After the refactor is completed, the notification interaction will no longer have to be routed through the DownloadNotificationService and the path will be DBR->DBM->native, where the DownloadBroadcastManager will be a service that just spins up and communicates to native.

Bug: 747569,747563 Change-Id: I27ff959b31cebba8f44fc2cc1cebfbeaf466cb64 Reviewed-on: Commit-Queue: Joy Ming

fe41630 Create DownloadBroadcastManager to handle communication to native.
.../browser/download/ | 174 +++++++++++++++
.../download/ | 243 ++++++++-------------
chrome/android/java_sources.gni | 1 +
.../download/ | 12 +
.../download/ | 5 -
5 files changed, 280 insertions(+), 155 deletions(-)


  • Share