• dcheng@chromium.org's avatar
    Remove superfluous call to SetURL in DragDownloadItem. · e69de2a5
    dcheng@chromium.org authored
    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
    e69de2a5
drag_download_item_views.cc 3.45 KB