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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java

Issue 1854523002: If a download is initiated by download attribute, don't use stream viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
index 79c4a63694cce36226db50de47a948defc8e7f7d..5fcd130907df5b836c77eef213e19abef85bd011 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java
@@ -149,16 +149,11 @@ public class ChromeDownloadDelegate implements ContentViewDownloadDelegate {
mDangerousDownloadListener = new DangerousDownloadListener();
}
- /**
- * Request a download from the given url, or if a streaming viewer is available stream the
- * content into the viewer.
- * @param downloadInfo Information about the download.
- */
@Override
- public void requestHttpGetDownload(DownloadInfo downloadInfo) {
+ public void requestHttpGetDownload(DownloadInfo downloadInfo, boolean mustDownload) {
// If we're dealing with A/V content that's not explicitly marked for download, check if it
// is streamable.
- if (!DownloadManagerService.isAttachment(downloadInfo.getContentDisposition())) {
+ if (!mustDownload) {
// Query the package manager to see if there's a registered handler that matches.
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse(downloadInfo.getUrl()), downloadInfo.getMimeType());
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698