| Index: chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
|
| index f3f9905fe82789bc1f0b637f02c36efe92864074..be68e2c4601d2bf19c429b2ec063ba40ad587f1f 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapter.java
|
| @@ -585,6 +585,16 @@ public class DownloadHistoryAdapter extends DateDividedAdapter
|
|
|
| DownloadHistoryItemWrapper existingWrapper = mOfflinePageItems.get(index);
|
| existingWrapper.replaceItem(item);
|
| + // Re-add the file mapping once it finishes downloading. This accounts for the
|
| + // backend creating Offline Pages with a null file path, then updating it after the
|
| + // download starts. Doing it once after completion instead of at every update
|
| + // is a compromise that prevents us from rapidly and repeatedly updating the map
|
| + // with the same info is progress is reported.
|
| + if (item.getDownloadState()
|
| + == org.chromium.components.offlinepages.downloads.DownloadState.COMPLETE) {
|
| + mFilePathsToItemsMap.addItem(existingWrapper);
|
| + }
|
| +
|
| updateDisplayedItems();
|
| }
|
|
|
|
|