Index: chrome/browser/android/download/download_controller.cc |
diff --git a/chrome/browser/android/download/download_controller.cc b/chrome/browser/android/download/download_controller.cc |
index 908b121896e53be78a268d17a61217f11891248d..c77b0f282df2296204a05c8ee2f9d44748d1b436 100644 |
--- a/chrome/browser/android/download/download_controller.cc |
+++ b/chrome/browser/android/download/download_controller.cc |
@@ -243,7 +243,9 @@ void DownloadController::OnDownloadStarted( |
ChromeDownloadDelegate* delegate = |
ChromeDownloadDelegate::FromWebContents(web_contents); |
- if (delegate) { |
+ // For dangerous item, we need to show the dangerous infobar before the |
+ // download can start. |
+ if (!download_item->IsDangerous() && delegate) { |
delegate->OnDownloadStarted( |
download_item->GetTargetFilePath().BaseName().value()); |
} |