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

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

Issue 2401143002: Don't prompt for download location on Android (Closed)
Patch Set: Created 4 years, 2 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/download_target_determiner.cc
diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/browser/download/download_target_determiner.cc
index 3a81369cb61e9b0bdf14a48bffefc7ce5d1c22da..b3841d70bb7eaae3d542a3a9c7f8a35be23c1f14 100644
--- a/chrome/browser/download/download_target_determiner.cc
+++ b/chrome/browser/download/download_target_determiner.cc
@@ -792,15 +792,12 @@ Profile* DownloadTargetDeterminer::GetProfile() const {
bool DownloadTargetDeterminer::ShouldPromptForDownload(
const base::FilePath& filename) const {
- if (is_resumption_) {
#if BUILDFLAG(ANDROID_JAVA_UI)
- // In case of file error, prompting user with the overwritten infobar
- // won't solve the issue. Return false so that resumption will fail again
- // if user hasn't performed any action to resolve file errors.
- // TODO(qinmin): show an error toast to warn user that resume cannot
- // continue due to file errors. http://crbug.com/581106.
+ // Don't prompt user about saving path on Android.
+ // TODO(qinmin): show an error toast to warn user in certain cases.
return false;
-#else
+#endif
+ if (is_resumption_) {
// For resumed downloads, if the target disposition or prefs require
// prompting, the user has already been prompted. Try to respect the user's
// selection, unless we've discovered that the target path cannot be used
@@ -809,7 +806,6 @@ bool DownloadTargetDeterminer::ShouldPromptForDownload(
return (reason == content::DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED ||
reason == content::DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE ||
reason == content::DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE);
-#endif
}
// If the download path is forced, don't prompt.

Powered by Google App Engine
This is Rietveld 408576698