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

Unified Diff: content/browser/download/download_manager_impl.cc

Issue 2618743006: Use previous target path when resuming a download after crash (Closed)
Patch Set: remove GetLastTargetPath function Created 3 years, 11 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: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 8131d2740b1bbc811762e9fd9e361eda65287c10..04ef9c772b23d37286cc65813937ba0e7e1ec6d6 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -220,8 +220,9 @@ void DownloadManagerImpl::DetermineDownloadTarget(
// type. If the types ever diverge, gasket code will need to
// be written here.
if (!delegate_ || !delegate_->DetermineDownloadTarget(item, callback)) {
- base::FilePath target_path = item->GetForcedFilePath();
- // TODO(asanka): Determine a useful path if |target_path| is empty.
+ base::FilePath target_path = item->GetForcedFilePath().empty() ?
asanka 2017/01/10 22:24:03 Ditto. No need to change //content filename determ
qinmin 2017/01/10 23:04:42 reverted
+ item->GetTargetFilePath() : item->GetForcedFilePath();
+ // TODO(qinmin): Determine a useful path if |target_path| is empty.
callback.Run(target_path,
DownloadItem::TARGET_DISPOSITION_OVERWRITE,
DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,

Powered by Google App Engine
This is Rietveld 408576698