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

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
Index: chrome/browser/ui/cocoa/tab_contents/web_drag_source.mm
===================================================================
--- chrome/browser/ui/cocoa/tab_contents/web_drag_source.mm (revision 85116)
+++ 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();
asanka 2011/05/13 13:32:24 Thanks for getting rid of this!
- download_util::GenerateFileName(downloadURL_,
- contentDisposition,
- std::string(),
- UTF16ToUTF8(mimeType),
- &downloadFileName_);
+ download_util::GenerateFileNameFromSuggestedName(
+ downloadURL_,
+ fileName.value(),
+ UTF16ToUTF8(mimeType),
+ &downloadFileName_);
fileExtension = SysUTF8ToNSString(downloadFileName_.Extension());
}
}

Powered by Google App Engine
This is Rietveld 408576698