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

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

Issue 2736843002: Fix the Download Notifications for Offline Pages to indicate bytes loaded. (Closed)
Patch Set: more fixes to more tests. 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 a51f90892d9d559d49c2e63dd03c923010ec340a..bcce2f9b5ae02ef7d8de410bfb5730ff7d1b1d70 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
@@ -475,7 +475,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);
}
@@ -499,7 +499,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