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

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

Issue 2261323002: Fix an issue that android doesn't know how to open the download after completion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/DownloadManagerDelegate.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 2a4998b170ff666e41621ed4427d4ff4df819aa9..db9af9cb7a740b96e5315b5afccdc3ed4ccc9d86 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
@@ -510,13 +510,14 @@ public class ChromeDownloadDelegate {
* @param filename file name obtained from content disposition header
* @return The MIME type that should be used for this data.
*/
- private static String remapGenericMimeType(String mimeType, String url, String filename) {
+ static String remapGenericMimeType(String mimeType, String url, String filename) {
// If we have one of "generic" MIME types, try to deduce
// the right MIME type from the file extension (if any):
if (mimeType == null || mimeType.isEmpty() || "text/plain".equals(mimeType)
|| "application/octet-stream".equals(mimeType)
|| "octet/stream".equals(mimeType)
- || "application/force-download".equals(mimeType)) {
+ || "application/force-download".equals(mimeType)
+ || "application/unknown".equals(mimeType)) {
if (!TextUtils.isEmpty(filename)) {
url = filename;
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerDelegate.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698