summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-25 05:57:57 +0000
committerqinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-25 05:57:57 +0000
commit2681f6ec8ab8c1559bcb2471c0c93af21d56e414 (patch)
tree39fa6331f56be4d0017ce0ea7b7b9d76c206571a
parent5eb403a3aaf051476d931148e8d337006147cb5b (diff)
downloadchromium_src-2681f6ec8ab8c1559bcb2471c0c93af21d56e414.zip
chromium_src-2681f6ec8ab8c1559bcb2471c0c93af21d56e414.tar.gz
chromium_src-2681f6ec8ab8c1559bcb2471c0c93af21d56e414.tar.bz2
Bypass the android download manager for all schemes other than http and https
As shown in DownloadManger java file, it only support http and https. So for all other schemes, we should use chrome to download it. BUG=235046 Review URL: https://chromiumcodereview.appspot.com/14449005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196330 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/android/intercept_download_resource_throttle.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/android/intercept_download_resource_throttle.cc b/chrome/browser/android/intercept_download_resource_throttle.cc
index 8283b1c..c901a3a 100644
--- a/chrome/browser/android/intercept_download_resource_throttle.cc
+++ b/chrome/browser/android/intercept_download_resource_throttle.cc
@@ -38,8 +38,11 @@ void InterceptDownloadResourceThrottle::ProcessDownloadRequest() {
request_->response_info().did_use_http_auth)
return;
- if (request_->url_chain().empty() ||
- request_->url_chain().back().SchemeIsFileSystem())
+ if (request_->url_chain().empty())
+ return;
+
+ GURL url = request_->url_chain().back();
+ if (!url.SchemeIs("http") && !url.SchemeIs("https"))
return;
content::DownloadControllerAndroid::Get()->CreateGETDownload(