Index: components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineItem.java |
diff --git a/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineItem.java b/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineItem.java |
index c4d734d78baf6af413003f76532d3e683c1891b9..9bc9a73071b1ee63fc2d3b5b33823fbe05348cab 100644 |
--- a/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineItem.java |
+++ b/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineItem.java |
@@ -15,6 +15,23 @@ import org.chromium.base.annotations.SuppressFBWarnings; |
*/ |
@SuppressFBWarnings("URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD") |
public class OfflineItem { |
+ /** |
+ * Contains relevant pieces of information to determine the download progress percentage for |
David Trainor- moved to gerrit
2017/05/03 22:06:31
Make this comment a bit more like the one above so
shaktisahu
2017/05/05 02:09:37
Done.
|
+ * displaying in the UI. |
+ */ |
+ public static class Progress { |
+ public long value; |
+ public long max; |
+ @OfflineItemProgressUnit |
+ public int unit; |
+ |
+ public Progress(long value, long max, int unit) { |
+ this.value = value; |
+ this.max = max; |
+ this.unit = unit; |
+ } |
+ } |
+ |
public ContentId id; |
// Display metadata. |
@@ -42,7 +59,7 @@ public class OfflineItem { |
public boolean isResumable; |
public boolean allowMetered; |
public long receivedBytes; |
- public int percentCompleted; |
+ public Progress progress; |
public long timeRemainingMs; |
public OfflineItem() { |