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

Unified Diff: chrome/browser/android/download/download_controller.cc

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 | « chrome/browser/android/download/chrome_download_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « chrome/browser/android/download/chrome_download_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698