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

Unified Diff: components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineItem.java

Issue 2861863002: offline_items_collection : Added helper class to determine progress (Closed)
Patch Set: more Created 3 years, 8 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: 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() {

Powered by Google App Engine
This is Rietveld 408576698