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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/download/ui/FilePathsToDownloadItemsMap.java

Issue 2511303002: [Downloads] Add support for tracking incomplete downloads (Closed)
Patch Set: Remove unnecessary function Created 4 years, 1 month 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: chrome/android/java/src/org/chromium/chrome/browser/download/ui/FilePathsToDownloadItemsMap.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/FilePathsToDownloadItemsMap.java b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/FilePathsToDownloadItemsMap.java
index 96644a491cc039d8c6ccd303b001d958c325b228..31f755ebe76bb4435331a8c4480b3fae220b34e0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/FilePathsToDownloadItemsMap.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/FilePathsToDownloadItemsMap.java
@@ -19,7 +19,7 @@ class FilePathsToDownloadItemsMap {
/**
* Adds a DownloadHistoryItemWrapper to the map. This method does not check whether the item
- * already exists in the map. If an item is being updated, use {@link #replaceItem}.
+ * already exists in the map.
* @param wrapper The item to add to the map.
*/
void addItem(DownloadHistoryItemWrapper wrapper) {
@@ -30,23 +30,6 @@ class FilePathsToDownloadItemsMap {
}
/**
- * Replaces a DownloadHistoryItemWrapper using the item's ID. Does nothing if the item does not
- * exist in the map.
- * @param wrapper The item to replace in the map
- */
- void replaceItem(DownloadHistoryItemWrapper wrapper) {
- ArrayList<DownloadHistoryItemWrapper> matchingItems = mMap.get(wrapper.getFilePath());
- if (matchingItems == null) return;
-
- for (int i = 0; i < matchingItems.size(); i++) {
- if (matchingItems.get(i).getId().equals(wrapper.getId())
- && matchingItems.get(i).isOffTheRecord() == wrapper.isOffTheRecord()) {
- matchingItems.set(i, wrapper);
- }
- }
- }
-
- /**
* Removes a DownloadHistoryItemWrapper from the map. Does nothing if the item does not exist in
* the map.
* @param wrapper The item to remove from the map.

Powered by Google App Engine
This is Rietveld 408576698