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

Unified Diff: chrome/browser/download/chrome_download_manager_delegate.cc

Issue 580043002: [Android] Prompt with infobar on filename conflict (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed nits Created 5 years, 10 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
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..2b9bebf057330c96ab597f4dcf78a83ea111e9c0 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,13 @@ void ChromeDownloadManagerDelegate::PromptUserForDownloadPath(
const base::FilePath& suggested_path,
const DownloadTargetDeterminerDelegate::FileSelectedCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+#if defined(OS_ANDROID)
+ chrome::android::DownloadOverwriteInfoBarDelegate::Create(
+ InfoBarService::FromWebContents(download->GetWebContents()),
+ suggested_path, callback);
+#else
DownloadFilePicker::ShowFilePicker(download, suggested_path, callback);
+#endif
}
void ChromeDownloadManagerDelegate::DetermineLocalPath(

Powered by Google App Engine
This is Rietveld 408576698