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

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

Issue 2880933002: Download driver for components/download. (Closed)
Patch Set: Polish comment. Created 3 years, 7 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 | « content/public/browser/download_manager.h ('k') | content/public/test/fake_download_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b1a8bce847874e69d1cc0b19d84edcc849360ef6..a88be116fc167a64ecaf6273fe2f2ed54c1cc4e4 100644
--- a/content/public/browser/download_url_parameters.h
+++ b/content/public/browser/download_url_parameters.h
@@ -209,6 +209,11 @@ class CONTENT_EXPORT DownloadUrlParameters {
// download is short-lived and is not shown in the UI.
void set_transient(bool transient) { transient_ = transient; }
+ // Sets the optional guid for the download, the guid serves as the unique
+ // identitfier for the download item. If no guid is provided, download
+ // system will automatically generate one.
+ void set_guid(const std::string& guid) { guid_ = guid; }
+
// 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
@@ -262,6 +267,7 @@ class CONTENT_EXPORT DownloadUrlParameters {
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_; }
+ std::string guid() const { return guid_; }
// STATE_CHANGING: Return the BlobDataHandle.
std::unique_ptr<storage::BlobDataHandle> GetBlobDataHandle() {
@@ -294,6 +300,7 @@ class CONTENT_EXPORT DownloadUrlParameters {
GURL url_;
bool do_not_prompt_for_login_;
bool transient_;
+ std::string guid_;
std::unique_ptr<storage::BlobDataHandle> blob_data_handle_;
DISALLOW_COPY_AND_ASSIGN(DownloadUrlParameters);
« no previous file with comments | « content/public/browser/download_manager.h ('k') | content/public/test/fake_download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698