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

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

Issue 2618743006: Use previous target path when resuming a download after crash (Closed)
Patch Set: adding a helper function to get last used target path 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_item_impl_delegate.cc
diff --git a/content/browser/download/download_item_impl_delegate.cc b/content/browser/download/download_item_impl_delegate.cc
index 96be706eee0373c3021b95ce2b80db0f08bea110..3ebb7d94635657bd722034e039a4bbfda8f7803c 100644
--- a/content/browser/download/download_item_impl_delegate.cc
+++ b/content/browser/download/download_item_impl_delegate.cc
@@ -29,8 +29,9 @@ void DownloadItemImplDelegate::Detach() {
void DownloadItemImplDelegate::DetermineDownloadTarget(
DownloadItemImpl* download, const DownloadTargetCallback& callback) {
- // TODO(rdsmith/asanka): Do something useful if forced file path is null.
- base::FilePath target_path(download->GetForcedFilePath());
+ // TODO(qinmin): Do something useful if both forced file path and
+ // target file path are null.
asanka 2017/01/10 19:34:19 Also note that this code path is unreachable in Ch
qinmin 2017/01/10 22:06:29 Done
+ base::FilePath target_path = download->GetLastUsedTargetPath();
callback.Run(target_path,
DownloadItem::TARGET_DISPOSITION_OVERWRITE,
DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,

Powered by Google App Engine
This is Rietveld 408576698