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

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

Issue 2811803006: Add support for pulling icons for OfflineItems (Closed)
Patch Set: More findbugs 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 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.bridges;
6 6
7 import org.chromium.base.annotations.CalledByNative; 7 import org.chromium.base.annotations.CalledByNative;
8 import org.chromium.base.annotations.JNINamespace; 8 import org.chromium.base.annotations.JNINamespace;
9 import org.chromium.components.offline_items_collection.OfflineItem;
10 import org.chromium.components.offline_items_collection.OfflineItemFilter;
11 import org.chromium.components.offline_items_collection.OfflineItemState;
9 12
10 import java.util.ArrayList; 13 import java.util.ArrayList;
11 14
12 /** 15 /**
13 * The Java counterpart to the C++ class OfflineItemBridge 16 * The Java counterpart to the C++ class OfflineItemBridge
14 * (components/offline_items_collection/core/android/offline_item_bridge.h). Th is class has no 17 * (components/offline_items_collection/core/android/offline_item_bridge.h). Th is class has no
15 * public members or methods and is meant as a private factory to build {@link O fflineItem} 18 * public members or methods and is meant as a private factory to build {@link O fflineItem}
16 * instances. 19 * instances.
17 */ 20 */
18 @JNINamespace("offline_items_collection::android") 21 @JNINamespace("offline_items_collection::android")
19 public class OfflineItemBridge { 22 public final class OfflineItemBridge {
20 private OfflineItemBridge() {} 23 private OfflineItemBridge() {}
21 24
22 /** 25 /**
23 * This is a helper method to allow C++ to create an {@link ArrayList} to ad d 26 * This is a helper method to allow C++ to create an {@link ArrayList} to ad d
24 * {@link OfflineItem}s to. 27 * {@link OfflineItem}s to.
25 * @return An {@link ArrayList} for {@link OfflineItem}s. 28 * @return An {@link ArrayList} for {@link OfflineItem}s.
26 */ 29 */
27 @CalledByNative 30 @CalledByNative
28 private static ArrayList<OfflineItem> createArrayList() { 31 private static ArrayList<OfflineItem> createArrayList() {
29 return new ArrayList<OfflineItem>(); 32 return new ArrayList<OfflineItem>();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 item.isResumable = isResumable; 66 item.isResumable = isResumable;
64 item.allowMetered = allowMetered; 67 item.allowMetered = allowMetered;
65 item.receivedBytes = receivedBytes; 68 item.receivedBytes = receivedBytes;
66 item.percentCompleted = percentCompleted; 69 item.percentCompleted = percentCompleted;
67 item.timeRemainingMs = timeRemainingMs; 70 item.timeRemainingMs = timeRemainingMs;
68 71
69 if (list != null) list.add(item); 72 if (list != null) list.add(item);
70 return item; 73 return item;
71 } 74 }
72 } 75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698