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

Unified Diff: chrome/browser/download/download_util.cc

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_util.cc
diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc
index 2abf2d16127f81c5bc775c87dfefa2f5cf038d4a..e1db3ffd38fe7e253f00c1b64ea722df4033df25 100644
--- a/chrome/browser/download/download_util.cc
+++ b/chrome/browser/download/download_util.cc
@@ -288,16 +288,13 @@ void GenerateExtension(const FilePath& file_name,
generated_extension->swap(extension);
}
-void GenerateFileNameFromRequest(const GURL& url,
- const std::string& content_disposition,
- const std::string& referrer_charset,
- const std::string& mime_type,
+void GenerateFileNameFromRequest(const DownloadItem& download_item,
FilePath* generated_name) {
- GenerateFileNameInternal(url,
- content_disposition,
- referrer_charset,
- std::string(),
- mime_type,
+ GenerateFileNameInternal(download_item.GetURL(),
+ download_item.content_disposition(),
+ download_item.referrer_charset(),
+ download_item.suggested_filename(),
+ download_item.mime_type(),
generated_name);
}

Powered by Google App Engine
This is Rietveld 408576698