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

Unified Diff: content/renderer/drop_data_builder.cc

Issue 2674953003: Only generate suggested filenames when actually dragging an image. (Closed)
Patch Set: rebase Created 3 years, 10 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 | « content/public/common/drop_data.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/drop_data_builder.cc
diff --git a/content/renderer/drop_data_builder.cc b/content/renderer/drop_data_builder.cc
index 65a5dc5fa31276bf80d9cbda2eca230ea5458108..4b3875b28792d9bd41c6f1096eb0d8381fb9069f 100644
--- a/content/renderer/drop_data_builder.cc
+++ b/content/renderer/drop_data_builder.cc
@@ -58,7 +58,16 @@ DropData DropDataBuilder::Build(const WebDragData& drag_data) {
case WebDragData::Item::StorageTypeBinaryData:
result.file_contents.assign(item.binaryData.data(),
item.binaryData.size());
- result.file_description_filename = item.title.utf16();
+ result.file_contents_source_url = item.binaryDataSourceURL;
+#if defined(OS_WIN)
+ result.file_contents_filename_extension =
+ item.binaryDataFilenameExtension.utf16();
+#else
+ result.file_contents_filename_extension =
+ item.binaryDataFilenameExtension.utf8();
+#endif
+ result.file_contents_content_disposition =
+ item.binaryDataContentDisposition.utf8();
break;
case WebDragData::Item::StorageTypeFilename:
// TODO(varunjain): This only works on chromeos. Support win/mac/gtk.
« no previous file with comments | « content/public/common/drop_data.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698