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

Unified Diff: content/public/browser/download_item.h

Issue 722953002: downloads: add the ability to undo download removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 6 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: content/public/browser/download_item.h
diff --git a/content/public/browser/download_item.h b/content/public/browser/download_item.h
index ed6cd3eea4b819fdca161b781ce742ca0ea5be27..b64bd0f71306e8cea3112f7cfc703d065007967c 100644
--- a/content/public/browser/download_item.h
+++ b/content/public/browser/download_item.h
@@ -63,6 +63,9 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
// This state indicates that the download has been interrupted.
INTERRUPTED,
+ // The user removed this download from their history.
benjhayden 2014/11/13 18:01:59 Clarify that the state is not terminal? "The user
+ REMOVED,
+
// Maximum value.
MAX_DOWNLOAD_STATE
};
@@ -138,6 +141,14 @@ class CONTENT_EXPORT DownloadItem : public base::SupportsUserData {
// when resuming a download (assuming the server supports byte ranges).
virtual void Cancel(bool user_cancel) = 0;
+ // Marks the download as removed but doesn't actually delete it yet. This
+ // behavior is used from chrome://downloads so removal can be undone.
+ virtual void MarkRemoved() = 0;
+
+ // Undoes the effects of MarkRemoved() and restores the download's |status_|
benjhayden 2014/11/13 18:01:59 This is an interface, so let's say something like
+ // to |prev_status_|. Used from chrome://downloads so removal can be undone.
+ virtual void UndoRemove() = 0;
+
// Removes the download from the views and history. If the download was
// in-progress or interrupted, then the intermediate file will also be
// deleted.

Powered by Google App Engine
This is Rietveld 408576698