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); |