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

Unified Diff: chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc

Issue 7005011: Fix bug 79905: Drag and drop of "DownloadURL" type ignores specified filename for data URLs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | « chrome/browser/ui/gtk/tab_contents_drag_source.cc ('k') | net/base/net_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc
===================================================================
--- chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc (revision 85826)
+++ chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc (working copy)
@@ -196,14 +196,12 @@
return;
// Generate the download filename.
- std::string content_disposition =
- "attachment; filename=" + UTF16ToUTF8(file_name.value());
FilePath generated_file_name;
- download_util::GenerateFileName(download_url,
- content_disposition,
- std::string(),
- UTF16ToUTF8(mime_type),
- &generated_file_name);
+ download_util::GenerateFileNameFromSuggestedName(
+ download_url,
+ UTF16ToUTF8(file_name.value()),
+ UTF16ToUTF8(mime_type),
+ &generated_file_name);
// Provide the data as file (CF_HDROP). A temporary download file with the
// Zone.Identifier ADS (Alternate Data Stream) attached will be created.
@@ -232,7 +230,7 @@
if (file_name.value().empty()) {
// Retrieve the name from the URL.
file_name = FilePath(
- net::GetSuggestedFilename(drop_data.url, "", "", string16()));
+ net::GetSuggestedFilename(drop_data.url, "", "", "", string16()));
if (file_name.value().size() + drop_data.file_extension.size() + 1 >
MAX_PATH) {
file_name = FilePath(file_name.value().substr(
« no previous file with comments | « chrome/browser/ui/gtk/tab_contents_drag_source.cc ('k') | net/base/net_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698