| Index: chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.cc
|
| diff --git a/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.cc b/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.cc
|
| index 5147a80235efec955d4387aa3649e56ce1914a06..c77718ccdf12f5f4944decd67ff9ff9500f24c01 100644
|
| --- a/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.cc
|
| +++ b/chrome/browser/android/download/chrome_download_manager_overwrite_infobar_delegate.cc
|
| @@ -28,7 +28,7 @@ void DeleteExistingDownloadFileDone(
|
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
| DownloadManagerService::GetInstance()->RemoveDownloadsForPath(
|
| download_path);
|
| - callback.Run(download_path);
|
| + callback.Run(DownloadConfirmationResult::CONFIRMED, download_path);
|
| }
|
|
|
| void DeleteExistingDownloadFile(
|
| @@ -46,12 +46,13 @@ void DeleteExistingDownloadFile(
|
|
|
| void CreateNewFileDone(
|
| const DownloadTargetDeterminerDelegate::FileSelectedCallback& callback,
|
| - const base::FilePath& target_path, bool verified) {
|
| + const base::FilePath& target_path,
|
| + DownloadTargetResult result) {
|
| DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
| - if (verified)
|
| - callback.Run(target_path);
|
| - else
|
| - callback.Run(base::FilePath());
|
| + callback.Run(result == DownloadTargetResult::SUCCESS
|
| + ? DownloadConfirmationResult::CONFIRMED
|
| + : DownloadConfirmationResult::CANCELED,
|
| + target_path);
|
| }
|
|
|
| } // namespace
|
| @@ -142,7 +143,8 @@ std::string ChromeDownloadManagerOverwriteInfoBarDelegate::GetDirFullPath()
|
| }
|
|
|
| void ChromeDownloadManagerOverwriteInfoBarDelegate::InfoBarDismissed() {
|
| - file_selected_callback_.Run(base::FilePath());
|
| + file_selected_callback_.Run(DownloadConfirmationResult::CANCELED,
|
| + base::FilePath());
|
| DownloadController::RecordDownloadCancelReason(
|
| DownloadController::CANCEL_REASON_OVERWRITE_INFOBAR_DISMISSED);
|
| }
|
|
|