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

Unified Diff: chrome/browser/ui/gtk/tab_contents_drag_source.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
Index: chrome/browser/ui/gtk/tab_contents_drag_source.cc
===================================================================
--- chrome/browser/ui/gtk/tab_contents_drag_source.cc (revision 85826)
+++ chrome/browser/ui/gtk/tab_contents_drag_source.cc (working copy)
@@ -291,15 +291,12 @@
GdkDragContext* drag_context) {
if (!download_url_.is_empty()) {
// Generate the file name based on both mime type and proposed file name.
- std::string download_mime_type = UTF16ToUTF8(wide_download_mime_type_);
- std::string content_disposition("attachment; filename=");
- content_disposition += download_file_name_.value();
FilePath generated_download_file_name;
- download_util::GenerateFileName(download_url_,
- content_disposition,
- std::string(),
- download_mime_type,
- &generated_download_file_name);
+ download_util::GenerateFileNameFromSuggestedName(
+ download_url_,
+ download_file_name_.value(),
+ UTF16ToUTF8(wide_download_mime_type_),
+ &generated_download_file_name);
// Pass the file name to the drop target by setting the source window's
// XdndDirectSave0 property.
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/web_drag_source.mm ('k') | chrome/browser/ui/views/tab_contents/tab_contents_drag_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698