Chromium Code Reviews| Index: chrome/browser/download/chrome_download_manager_delegate.cc |
| diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc |
| index c151f3e44f63f0d7c13715d52176b9115e634039..c514a0f95f6354f50d3a69ca296401d08d1b960d 100644 |
| --- a/chrome/browser/download/chrome_download_manager_delegate.cc |
| +++ b/chrome/browser/download/chrome_download_manager_delegate.cc |
| @@ -57,7 +57,7 @@ |
| #include "ui/base/l10n/l10n_util.h" |
| #if BUILDFLAG(ANDROID_JAVA_UI) |
| -#include "chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.h" |
| +#include "chrome/browser/android/download/chrome_duplicate_download_infobar_delegate.h" |
| #include "chrome/browser/infobars/infobar_service.h" |
| #endif |
| @@ -617,9 +617,11 @@ void ChromeDownloadManagerDelegate::PromptUserForDownloadPath( |
| const DownloadTargetDeterminerDelegate::FileSelectedCallback& callback) { |
| DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| #if BUILDFLAG(ANDROID_JAVA_UI) |
| - chrome::android::ChromeDownloadManagerOverwriteInfoBarDelegate::Create( |
| - InfoBarService::FromWebContents(download->GetWebContents()), download, |
| - suggested_path, callback); |
| + content::WebContents* web_contents = download->GetWebContents(); |
|
asanka
2016/11/10 20:49:39
It's possible for the WebContents to be null here.
qinmin
2016/11/10 21:37:08
null WebContents caused by resumption attempt with
asanka
2016/11/10 21:57:13
Sure. But ReserveVirtualPathDone() isn't where we
|
| + chrome::android::ChromeDuplicateDownloadInfoBarDelegate::Create( |
| + InfoBarService::FromWebContents(web_contents), download, |
| + suggested_path, web_contents->GetBrowserContext()->IsOffTheRecord(), |
|
asanka
2016/11/10 20:49:39
Nit: IsOffTheRecord() is redundant. ChromeDuplicat
qinmin
2016/11/10 21:37:08
Done.
|
| + callback); |
| #else |
| DownloadFilePicker::ShowFilePicker(download, suggested_path, callback); |
| #endif |