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

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

Issue 2609113004: Fix a crash when downloading a dangerous download (Closed)
Patch Set: Created 3 years, 12 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/browser/android/download/chrome_download_delegate.cc » ('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 f4a3c9e91b165170d49d786ec3e05e9446070934..437c88db1bf0a4a71898d48432b6985a9a72e946 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
@@ -318,10 +318,8 @@ public class ChromeDownloadDelegate {
*/
@CalledByNative
private void onDownloadStarted(String filename) {
- if (!isDangerousFile(filename)) {
- DownloadUtils.showDownloadStartToast(mContext);
- closeBlankTab();
- }
+ DownloadUtils.showDownloadStartToast(mContext);
+ closeBlankTab();
}
/**
@@ -378,16 +376,6 @@ public class ChromeDownloadDelegate {
}
/**
- * Check whether a file is dangerous.
- *
- * @param filename Name of the file.
- * @return true if the file is dangerous, or false otherwise.
- */
- protected boolean isDangerousFile(String filename) {
- return nativeIsDownloadDangerous(filename);
- }
-
- /**
* Discards a downloaded file.
*
* @param filepath File to be discarded.
@@ -475,7 +463,6 @@ public class ChromeDownloadDelegate {
private native void nativeInit(WebContents webContents);
private static native String nativeGetDownloadWarningText(String filename);
- private static native boolean nativeIsDownloadDangerous(String filename);
private static native void nativeLaunchDuplicateDownloadInfoBar(ChromeDownloadDelegate delegate,
Tab tab, DownloadInfo downloadInfo, String filePath, boolean isIncognito);
private static native void nativeLaunchPermissionUpdateInfoBar(
« no previous file with comments | « no previous file | chrome/browser/android/download/chrome_download_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698