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

Unified Diff: chrome/browser/download/download_item.h

Issue 7484061: Use the suggested name from an anchor's 'download' attribute. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2011 Created 9 years, 5 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: chrome/browser/download/download_item.h
diff --git a/chrome/browser/download/download_item.h b/chrome/browser/download/download_item.h
index 64704dd18debd44601dfb2ca18526e625d2b4170..5596b53c3780720e9909cf4d5d7d7e2fe20559dc 100644
--- a/chrome/browser/download/download_item.h
+++ b/chrome/browser/download/download_item.h
@@ -266,6 +266,7 @@ class DownloadItem : public NotificationObserver {
const std::vector<GURL>& url_chain() const { return url_chain_; }
const GURL& original_url() const { return url_chain_.front(); }
const GURL& referrer_url() const { return referrer_url_; }
+ std::string suggested_filename() const { return suggested_filename_; }
std::string content_disposition() const { return content_disposition_; }
std::string mime_type() const { return mime_type_; }
std::string original_mime_type() const { return original_mime_type_; }
@@ -394,6 +395,10 @@ class DownloadItem : public NotificationObserver {
// The URL of the page that initiated the download.
GURL referrer_url_;
+ // Suggested filename in 'download' attribute of an anchor. Details:
+ // http://www.whatwg.org/specs/web-apps/current-work/#downloading-hyperlinks
+ std::string suggested_filename_;
+
// Information from the request.
// Content-disposition field from the header.
std::string content_disposition_;

Powered by Google App Engine
This is Rietveld 408576698