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

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

Issue 2478583004: implementation for new duplicate download UI (Closed)
Patch Set: do null check on webcontents Created 4 years, 1 month 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 c151f3e44f63f0d7c13715d52176b9115e634039..9af11e698d82f8eb1f78272b25964b9e0d5d3d83 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,8 +617,13 @@ 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,
+ content::WebContents* web_contents = download->GetWebContents();
+ if (!web_contents) {
+ callback.Run(base::FilePath());
+ return;
+ }
+ chrome::android::ChromeDuplicateDownloadInfoBarDelegate::Create(
+ InfoBarService::FromWebContents(web_contents), download,
suggested_path, callback);
#else
DownloadFilePicker::ShowFilePicker(download, suggested_path, callback);
« no previous file with comments | « chrome/browser/android/offline_pages/downloads/offline_page_infobar_delegate.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698