New issue
Advanced search Search tips

Issue 599300 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: ----



Sign in to add a comment

Chrome no longer respect the download attribute for anchor element with media url

Project Member Reported by qin...@chromium.org, Mar 30 2016

Issue description

This started happening very recently (either this week or last week), even on stable channels.

Things like
<a href="http://video.webmfiles.org/big-buck-bunny_trailer.webm" download>DOWNLOAD</a>
should trigger a download when clicked.

But on android, now it starts the android galary/photo app to play the media.




 
Local build on official build?

Comment 2 by qin...@chromium.org, Mar 31 2016

official and local, wondering what's happened.
Components: UI>Browser>Downloads
Hmm, strange. +download folk
Status: Assigned (was: Unconfirmed)

Comment 5 by qin...@chromium.org, Mar 31 2016

Cc: asanka@chromium.org
Wierd, when resourceLoader::OnResponseStarted(), it immediately calls ResponseCompleted() without reading the data. 

Comment 6 by qin...@chromium.org, Mar 31 2016

@asanka, could this be related to https://codereview.chromium.org/148133007/. I am wondering if this is caused by incorrectly constructing the URLRequest

Comment 7 by asanka@chromium.org, Mar 31 2016

This is consistent with the request being intercepted and passed off to the Android system. Can you check the log on a debug build to see if we are hitting LaunchAppWithUrl and if so whether it launches an app instead of allowing the navigation to proceed?

Comment 8 by qin...@chromium.org, Mar 31 2016

very fishy, we are not hitting LaunchAppWithUrl(), and we are not hitting ResourceLoaderDelegate::HandleExternalProtocol either.

Comment 9 by qin...@chromium.org, Mar 31 2016

The problem is caused by that ChromeDownloadDelegate#requestHttpGetDownload() will launch stream viewer if it is available for the mime type, and it only respects the content-disposition==download, not the download attribute.
Project Member

Comment 10 by bugdroid1@chromium.org, Apr 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2

commit a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2
Author: qinmin <qinmin@chromium.org>
Date: Tue Apr 05 19:24:41 2016

If a download is initiated by download attribute, don't use stream viewer

BUG=599300

Review URL: https://codereview.chromium.org/1854523002

Cr-Commit-Position: refs/heads/master@{#385253}

[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/chrome/browser/android/download/mock_download_controller_android.cc
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/chrome/browser/android/download/mock_download_controller_android.h
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/chrome/browser/android/intercept_download_resource_throttle.cc
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/chrome/browser/android/intercept_download_resource_throttle.h
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/content/browser/android/download_controller_android_impl.cc
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/content/browser/android/download_controller_android_impl.h
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/content/public/android/java/src/org/chromium/content/browser/ContentViewDownloadDelegate.java
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/content/public/android/java/src/org/chromium/content/browser/DownloadController.java
[modify] https://crrev.com/a39db05f58be12ac3ce59cfa62dfd4d3fc4a8df2/content/public/browser/android/download_controller_android.h

Sign in to add a comment