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

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

Issue 2258553003: [Downloads] Handle externally deleted items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dfalcantara@ review Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java
index 0ed498041a8167eff22c546d248506efb3cf83b1..92c87a9a1e616b237f792dbfd7208d7104cb2b62 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadItem.java
@@ -14,6 +14,7 @@ public class DownloadItem {
private DownloadInfo mDownloadInfo;
private long mDownloadId = INVALID_DOWNLOAD_ID;
private long mStartTime;
+ private boolean mHasBeenExternallyRemoved;
public DownloadItem(boolean useAndroidDownloadManager, DownloadInfo info) {
mUseAndroidDownloadManager = useAndroidDownloadManager;
@@ -86,4 +87,24 @@ public class DownloadItem {
public long getStartTime() {
return mStartTime;
}
+
+ /**
+ * Sets whether the file associated with this item has been removed through an external
+ * action.
+ *
+ * @param hasBeenExternallyRemoved Whether the file associated with this item has been removed
+ * from the file system through a means other than the browser
+ * download ui.
+ */
+ public void setHasBeenExternallyRemoved(boolean hasBeenExternallyRemoved) {
+ mHasBeenExternallyRemoved = hasBeenExternallyRemoved;
+ }
+
+ /**
+ * @return Whether the file associated with this item has been removed from the file system
+ * through a means other than the browser download ui.
+ */
+ public boolean hasBeenExternallyRemoved() {
+ return mHasBeenExternallyRemoved;
+ }
}
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698