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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java

Issue 2228193002: [Offline pages] Download UI: Adding Download Service Delegate for notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding a TODO Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
index 6335d3f50a38e9a4e0c582956c82a2d79af5484d..eca01a865ad6944822974e6d2c80bcdec85590c3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
@@ -58,7 +58,8 @@ import java.util.concurrent.TimeUnit;
public class DownloadManagerService extends BroadcastReceiver implements
DownloadController.DownloadNotificationService,
NetworkChangeNotifierAutoDetect.Observer,
- DownloadManagerDelegate.DownloadQueryCallback {
+ DownloadManagerDelegate.DownloadQueryCallback,
+ DownloadServiceDelegate {
// Download status.
public static final int DOWNLOAD_STATUS_IN_PROGRESS = 0;
public static final int DOWNLOAD_STATUS_COMPLETE = 1;
@@ -1080,8 +1081,7 @@ public class DownloadManagerService extends BroadcastReceiver implements
* @param item Download item to resume.
* @param hasUserGesture Whether the resumption is triggered by user gesture.
*/
- @VisibleForTesting
- protected void resumeDownload(DownloadItem item, boolean hasUserGesture) {
+ public void resumeDownload(DownloadItem item, boolean hasUserGesture) {
DownloadProgress progress = mDownloadProgressMap.get(item.getId());
if (progress != null && progress.mDownloadStatus == DOWNLOAD_STATUS_IN_PROGRESS
&& !progress.mDownloadItem.getDownloadInfo().isPaused()) {
@@ -1116,7 +1116,7 @@ public class DownloadManagerService extends BroadcastReceiver implements
* @param isOffTheRecord Whether the download is off the record.
* @param isNotificationDismissed Whether cancel is caused by dismissing the notification.
*/
- void cancelDownload(String downloadGuid, boolean isOffTheRecord,
+ public void cancelDownload(String downloadGuid, boolean isOffTheRecord,
boolean isNotificationDismissed) {
nativeCancelDownload(getNativeDownloadManagerService(), downloadGuid, isOffTheRecord,
isNotificationDismissed);
@@ -1128,7 +1128,7 @@ public class DownloadManagerService extends BroadcastReceiver implements
* @param downloadGuid GUID of the download.
* @param isOffTheRecord Whether the download is off the record.
*/
- void pauseDownload(String downloadGuid, boolean isOffTheRecord) {
+ public void pauseDownload(String downloadGuid, boolean isOffTheRecord) {
nativePauseDownload(getNativeDownloadManagerService(), downloadGuid, isOffTheRecord);
DownloadProgress progress = mDownloadProgressMap.get(downloadGuid);
// Calling pause will stop listening to the download item. Update its progress now.
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698