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 2a999482d93f0be4fc27f0351ecd49ff4a0f3e6d..d5984be101ff681954b5ed0c3b20031d3cbedd0c 100644 |
| --- a/chrome/browser/download/chrome_download_manager_delegate.cc |
| +++ b/chrome/browser/download/chrome_download_manager_delegate.cc |
| @@ -49,6 +49,11 @@ |
| #include "net/base/filename_util.h" |
| #include "net/base/mime_util.h" |
| +#if defined(OS_ANDROID) |
| +#include "chrome/browser/android/download_overwrite_infobar_delegate.h" |
| +#include "chrome/browser/infobars/infobar_service.h" |
| +#endif |
| + |
| #if defined(OS_CHROMEOS) |
| #include "chrome/browser/chromeos/drive/download_handler.h" |
| #include "chrome/browser/chromeos/drive/file_system_util.h" |
| @@ -573,7 +578,19 @@ void ChromeDownloadManagerDelegate::PromptUserForDownloadPath( |
| const base::FilePath& suggested_path, |
| const DownloadTargetDeterminerDelegate::FileSelectedCallback& callback) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| +#if defined(OS_ANDROID) |
| + content::WebContents* web_contents = download->GetWebContents(); |
| + if (!web_contents) |
|
Peter Kasting
2015/02/18 21:32:29
When can this conditional be true? Please add com
Changwan Ryu
2015/02/19 07:41:15
Removed
|
| + return; |
| + |
| + InfoBarService* infobar_service = |
| + InfoBarService::FromWebContents(web_contents); |
|
Peter Kasting
2015/02/18 21:32:29
Nit: Just inline this into the call below.
Changwan Ryu
2015/02/19 07:41:15
Done.
|
| + |
| + chrome::android::DownloadOverwriteInfoBarDelegate::Create( |
| + infobar_service, suggested_path, callback); |
| +#else |
| DownloadFilePicker::ShowFilePicker(download, suggested_path, callback); |
| +#endif |
| } |
| void ChromeDownloadManagerDelegate::DetermineLocalPath( |