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

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

Issue 2754363004: OfflineContentProvider changes to start service (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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.components.offline_items_collection; 5 package org.chromium.components.offline_items_collection;
6 6
7 import org.chromium.base.annotations.SuppressFBWarnings; 7 import org.chromium.base.annotations.SuppressFBWarnings;
8 import org.chromium.components.offline_items_collection.OfflineItemFilter.Offlin eItemFilterEnum; 8 import org.chromium.components.offline_items_collection.OfflineItemFilter.Offlin eItemFilterEnum;
9 import org.chromium.components.offline_items_collection.OfflineItemState.Offline ItemStateEnum; 9 import org.chromium.components.offline_items_collection.OfflineItemState.Offline ItemStateEnum;
10 10
(...skipping 26 matching lines...) Expand all
37 public boolean isOffTheRecord; 37 public boolean isOffTheRecord;
38 38
39 // In Progress Metadata. 39 // In Progress Metadata.
40 @OfflineItemStateEnum 40 @OfflineItemStateEnum
41 public int state; 41 public int state;
42 public boolean isResumable; 42 public boolean isResumable;
43 public long receivedBytes; 43 public long receivedBytes;
44 public int percentCompleted; 44 public int percentCompleted;
45 public long timeRemainingMs; 45 public long timeRemainingMs;
46 46
47 OfflineItem() { 47 public OfflineItem() {
48 id = new ContentId(); 48 this.id = new ContentId();
gone 2017/03/20 19:03:36 why add the this. for one of them but not the othe
David Trainor- moved to gerrit 2017/03/25 03:31:13 Ah sorry I used to allow passing in an id, so I ha
49 filter = OfflineItemFilter.FILTER_OTHER; 49 filter = OfflineItemFilter.FILTER_OTHER;
50 state = OfflineItemState.COMPLETE; 50 state = OfflineItemState.COMPLETE;
qinmin 2017/03/22 07:53:58 should the initial state is COMPLETE?
51 } 51 }
52
53 @Override
54 public String toString() {
55 return getClass().getSimpleName() + "@" + Integer.toHexString(hashCode() ) + " [" + id + "]";
gone 2017/03/20 19:03:36 was this thing automatically added?
David Trainor- moved to gerrit 2017/03/25 03:31:13 No but it makes debugging unit tests easier as moc
56 }
52 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698