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

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

Issue 2742833004: Fix the Download Notifications for Offline Pages to indicate bytes loaded. (Closed)
Patch Set: Created 3 years, 9 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/DownloadNotificationService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
index bc37743bb16901b83030a1988a5c35c98a653f24..c30c373a671bf8db89c9b9719f4c2778f7106642 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
@@ -690,7 +690,7 @@ public class DownloadNotificationService extends Service {
private void notifyDownloadPending(String downloadGuid, String fileName, boolean isOffTheRecord,
boolean canDownloadWhileMetered, boolean isOfflinePage) {
updateActiveDownloadNotification(downloadGuid, fileName,
- DownloadItem.INVALID_DOWNLOAD_PERCENTAGE, 0, 0, 0, isOffTheRecord,
+ DownloadItem.INDETERMINATE_DOWNLOAD_PERCENTAGE, 0, 0, 0, isOffTheRecord,
canDownloadWhileMetered, isOfflinePage, true);
}
@@ -714,7 +714,7 @@ public class DownloadNotificationService extends Service {
boolean isOffTheRecord, boolean canDownloadWhileMetered, boolean isOfflinePage,
boolean isDownloadPending) {
boolean indeterminate =
- (percentage == DownloadItem.INVALID_DOWNLOAD_PERCENTAGE) || isDownloadPending;
+ (percentage == DownloadItem.INDETERMINATE_DOWNLOAD_PERCENTAGE) || isDownloadPending;
String contentText = null;
if (isDownloadPending) {
contentText = mContext.getResources().getString(R.string.download_notification_pending);

Powered by Google App Engine
This is Rietveld 408576698