Index: components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineItemBridge.java |
diff --git a/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineItemBridge.java b/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineItemBridge.java |
deleted file mode 100644 |
index c5209280f8ee640182a56476200f510c14af9032..0000000000000000000000000000000000000000 |
--- a/components/offline_items_collection/core/android/java/src/org/chromium/components/offline_items_collection/OfflineItemBridge.java |
+++ /dev/null |
@@ -1,72 +0,0 @@ |
-// Copyright 2017 The Chromium Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-package org.chromium.components.offline_items_collection; |
- |
-import org.chromium.base.annotations.CalledByNative; |
-import org.chromium.base.annotations.JNINamespace; |
- |
-import java.util.ArrayList; |
- |
-/** |
- * The Java counterpart to the C++ class OfflineItemBridge |
- * (components/offline_items_collection/core/android/offline_item_bridge.h). This class has no |
- * public members or methods and is meant as a private factory to build {@link OfflineItem} |
- * instances. |
- */ |
-@JNINamespace("offline_items_collection::android") |
-public class OfflineItemBridge { |
- private OfflineItemBridge() {} |
- |
- /** |
- * This is a helper method to allow C++ to create an {@link ArrayList} to add |
- * {@link OfflineItem}s to. |
- * @return An {@link ArrayList} for {@link OfflineItem}s. |
- */ |
- @CalledByNative |
- private static ArrayList<OfflineItem> createArrayList() { |
- return new ArrayList<OfflineItem>(); |
- } |
- |
- /** |
- * Creates an {@link OfflineItem} from the passed in parameters. See {@link OfflineItem} for a |
- * list of the members that will be populated. If {@code list} isn't {@code null}, the newly |
- * created {@link OfflineItem} will be added to it. |
- * @param list An {@link ArrayList} to optionally add the newly created {@link OfflineItem} to. |
- * @return The newly created {@link OfflineItem} based on the passed in parameters. |
- */ |
- @CalledByNative |
- private static OfflineItem createOfflineItemAndMaybeAddToList(ArrayList<OfflineItem> list, |
- String nameSpace, String id, String title, String description, |
- @OfflineItemFilter int filter, boolean isTransient, long totalSizeBytes, |
- boolean externallyRemoved, long creationTimeMs, long lastAccessedTimeMs, |
- boolean isOpenable, String pageUrl, String originalUrl, boolean isOffTheRecord, |
- @OfflineItemState int state, boolean isResumable, boolean allowMetered, |
- long receivedBytes, int percentCompleted, long timeRemainingMs) { |
- OfflineItem item = new OfflineItem(); |
- item.id.namespace = nameSpace; |
- item.id.id = id; |
- item.title = title; |
- item.description = description; |
- item.filter = filter; |
- item.isTransient = isTransient; |
- item.totalSizeBytes = totalSizeBytes; |
- item.externallyRemoved = externallyRemoved; |
- item.creationTimeMs = creationTimeMs; |
- item.lastAccessedTimeMs = lastAccessedTimeMs; |
- item.isOpenable = isOpenable; |
- item.pageUrl = pageUrl; |
- item.originalUrl = originalUrl; |
- item.isOffTheRecord = isOffTheRecord; |
- item.state = state; |
- item.isResumable = isResumable; |
- item.allowMetered = allowMetered; |
- item.receivedBytes = receivedBytes; |
- item.percentCompleted = percentCompleted; |
- item.timeRemainingMs = timeRemainingMs; |
- |
- if (list != null) list.add(item); |
- return item; |
- } |
-} |