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

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

Issue 2791453003: DownloadManager : Create transient downloads (Closed)
Patch Set: nits Created 3 years, 8 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
Index: content/public/browser/download_url_parameters.h
diff --git a/content/public/browser/download_url_parameters.h b/content/public/browser/download_url_parameters.h
index 88ff9d4d87cfcb2cd60e13241f14483525146201..b1a8bce847874e69d1cc0b19d84edcc849360ef6 100644
--- a/content/public/browser/download_url_parameters.h
+++ b/content/public/browser/download_url_parameters.h
@@ -205,6 +205,10 @@ class CONTENT_EXPORT DownloadUrlParameters {
do_not_prompt_for_login_ = do_not_prompt;
}
+ // Sets whether the download is to be treated as transient. A transient
+ // download is short-lived and is not shown in the UI.
+ void set_transient(bool transient) { transient_ = transient; }
+
// For downloads of blob URLs, the caller can store a BlobDataHandle in the
// DownloadUrlParameters object so that the blob will remain valid until
// the download starts. The BlobDataHandle will be attached to the associated
@@ -257,6 +261,7 @@ class CONTENT_EXPORT DownloadUrlParameters {
bool prompt() const { return save_info_.prompt_for_save_location; }
const GURL& url() const { return url_; }
bool do_not_prompt_for_login() const { return do_not_prompt_for_login_; }
+ bool is_transient() const { return transient_; }
// STATE_CHANGING: Return the BlobDataHandle.
std::unique_ptr<storage::BlobDataHandle> GetBlobDataHandle() {
@@ -288,6 +293,7 @@ class CONTENT_EXPORT DownloadUrlParameters {
DownloadSaveInfo save_info_;
GURL url_;
bool do_not_prompt_for_login_;
+ bool transient_;
std::unique_ptr<storage::BlobDataHandle> blob_data_handle_;
DISALLOW_COPY_AND_ASSIGN(DownloadUrlParameters);
« no previous file with comments | « content/browser/download/download_request_core.cc ('k') | content/public/browser/download_url_parameters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698