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

Unified Diff: chrome/browser/ui/cocoa/tab_contents/web_drag_source.mm

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/download/save_package.cc ('k') | chrome/browser/ui/gtk/tab_contents_drag_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/tab_contents/web_drag_source.mm
===================================================================
--- chrome/browser/ui/cocoa/tab_contents/web_drag_source.mm (revision 85826)
+++ chrome/browser/ui/cocoa/tab_contents/web_drag_source.mm (working copy)
@@ -69,7 +69,7 @@
if (file_name.empty()) {
// Retrieve the name from the URL.
string16 suggested_filename =
- net::GetSuggestedFilename(drop_data.url, "", "", string16());
+ net::GetSuggestedFilename(drop_data.url, "", "", "", string16());
file_name = FilePathFromFilename(suggested_filename);
}
@@ -402,13 +402,11 @@
&mimeType,
&fileName,
&downloadURL_)) {
- std::string contentDisposition =
- "attachment; filename=" + fileName.value();
- download_util::GenerateFileName(downloadURL_,
- contentDisposition,
- std::string(),
- UTF16ToUTF8(mimeType),
- &downloadFileName_);
+ download_util::GenerateFileNameFromSuggestedName(
+ downloadURL_,
+ fileName.value(),
+ UTF16ToUTF8(mimeType),
+ &downloadFileName_);
fileExtension = SysUTF8ToNSString(downloadFileName_.Extension());
}
}
« no previous file with comments | « chrome/browser/download/save_package.cc ('k') | chrome/browser/ui/gtk/tab_contents_drag_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698