summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-29 01:32:21 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-29 01:32:21 +0000
commite69de2a5d861ee6933001e943254a864a98f9456 (patch)
treed0bf1c3cf34c93c43ac02bf90cb7646b3d1cc3d9 /chrome/browser/download
parente81f5f9dab753290125ba1f026e2c138795bf658 (diff)
downloadchromium_src-e69de2a5d861ee6933001e943254a864a98f9456.zip
chromium_src-e69de2a5d861ee6933001e943254a864a98f9456.tar.gz
chromium_src-e69de2a5d861ee6933001e943254a864a98f9456.tar.bz2
Remove superfluous call to SetURL in DragDownloadItem.
The download item code tried to be helpful and make sure Blink could navigate to download items dropped in a web contents by setting a file URL in the drop data. Unfortunately, this doesn't work because RenderViewHostImpl::DragTargetDragEnter filters out file URLs and rewrites it to about:blank, and Blink happily navigates there instead of the file. As it turns out, this is unnecessary because Blink already converts the filename to a URL when it attempts to turn drops into navigations so we get this behavior for free by omitting the call to SetURL. It also confuses some Linux file managers, causing them to link to the file instead of making a copy when the item is dragged from the download bar. BUG=356794 TEST=drag download bar items to the desktop (should copy) and to another Chrome window (should navigate) R=thakis@chromium.org Review URL: https://codereview.chromium.org/217243003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260334 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r--chrome/browser/download/drag_download_item_views.cc4
1 files changed, 0 insertions, 4 deletions
diff --git a/chrome/browser/download/drag_download_item_views.cc b/chrome/browser/download/drag_download_item_views.cc
index 2fced53..5ecfbc8 100644
--- a/chrome/browser/download/drag_download_item_views.cc
+++ b/chrome/browser/download/drag_download_item_views.cc
@@ -60,10 +60,6 @@ void DragDownloadItem(const content::DownloadItem* download,
ui::FileInfo(full_path, download->GetFileNameToReportUser()));
data.SetFilenames(file_infos);
- // Add URL so that we can load supported files when dragged to WebContents.
- data.SetURL(net::FilePathToFileURL(full_path),
- download->GetFileNameToReportUser().LossyDisplayName());
-
#if !defined(TOOLKIT_GTK)
#if defined(USE_AURA)
aura::Window* root_window = view->GetRootWindow();