summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/gtk/tab_contents_drag_source.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/gtk/tab_contents_drag_source.cc')
-rw-r--r--chrome/browser/ui/gtk/tab_contents_drag_source.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/chrome/browser/ui/gtk/tab_contents_drag_source.cc b/chrome/browser/ui/gtk/tab_contents_drag_source.cc
index 4ae83bb..1da585e 100644
--- a/chrome/browser/ui/gtk/tab_contents_drag_source.cc
+++ b/chrome/browser/ui/gtk/tab_contents_drag_source.cc
@@ -291,15 +291,12 @@ void TabContentsDragSource::OnDragBegin(GtkWidget* sender,
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.