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

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

Issue 1673183003: add pause button for resumable in-progress downloads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding assert Created 4 years, 10 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
Index: chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java b/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java
index 3f9b4d4eeac5ddf333f56804a7ca73a147bbafe9..e00cea598c304446bbdea7ce2b812e9c1b0f2a3d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java
@@ -219,10 +219,16 @@ public class SystemDownloadNotifier implements DownloadNotifier {
} else {
switch (type) {
case DOWNLOAD_NOTIFICATION_TYPE_PROGRESS:
- mBoundService.notifyDownloadProgress(
- info.getDownloadId(), info.getFileName(),
- info.getPercentCompleted(), info.getTimeRemainingInMillis(),
- startTime);
+ if (info.isPaused()) {
+ assert info.isResumable();
+ mBoundService.notifyDownloadPaused(
+ info.getDownloadId(), info.getFileName(), info.isResumable());
+ } else {
+ mBoundService.notifyDownloadProgress(
+ info.getDownloadId(), info.getFileName(),
+ info.getPercentCompleted(), info.getTimeRemainingInMillis(),
+ startTime, info.isResumable());
+ }
break;
case DOWNLOAD_NOTIFICATION_TYPE_SUCCESS:
mBoundService.notifyDownloadSuccessful(

Powered by Google App Engine
This is Rietveld 408576698