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

Unified Diff: content/browser/download/download_item_impl.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.cc
diff --git a/content/browser/download/download_item_impl.cc b/content/browser/download/download_item_impl.cc
index 9f9eae57ca69e1e02ec65b9d807bf6ec1965e1ab..cb96e3805867223859a3b1656dedee4abf177e49 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -627,6 +627,12 @@ const base::FilePath& DownloadItemImpl::GetForcedFilePath() const {
return forced_file_path_;
}
+base::FilePath DownloadItemImpl::GetLastUsedTargetPath() const {
asanka 2017/01/10 19:34:19 Is there a case where GetTargetFilePath() and GetF
qinmin 2017/01/10 22:06:29 Done.
+ if (GetForcedFilePath().empty())
+ return GetTargetFilePath();
+ return GetForcedFilePath();
+}
+
base::FilePath DownloadItemImpl::GetFileNameToReportUser() const {
if (!display_name_.empty())
return display_name_;

Powered by Google App Engine
This is Rietveld 408576698