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

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

Issue 11363222: Persist download interrupt reason, both target and current paths, and url_chain. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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: 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 f23248c8fade6294e60a5e5306e94e5c4ad92a60..510b3371a72eb2e9d536c77416734842f92035bb 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -132,10 +132,10 @@ DownloadItemImpl::DownloadItemImpl(DownloadItemImplDelegate* delegate,
const net::BoundNetLog& bound_net_log)
: is_save_package_download_(false),
download_id_(download_id),
- current_path_(info.path),
- target_path_(info.path),
+ current_path_(info.current_path),
+ target_path_(info.target_path),
target_disposition_(TARGET_DISPOSITION_OVERWRITE),
- url_chain_(1, info.url),
+ url_chain_(info.url_chain),
referrer_url_(info.referrer_url),
transition_type_(PAGE_TRANSITION_LINK),
has_user_gesture_(false),
@@ -700,14 +700,16 @@ bool DownloadItemImpl::GetOpened() const {
DownloadPersistentStoreInfo DownloadItemImpl::GetPersistentStoreInfo() const {
// TODO(asanka): Persist GetTargetFilePath() as well.
- return DownloadPersistentStoreInfo(GetFullPath(),
- GetURL(),
+ return DownloadPersistentStoreInfo(GetTargetFilePath(),
+ GetFullPath(),
+ GetUrlChain(),
GetReferrerUrl(),
GetStartTime(),
GetEndTime(),
GetReceivedBytes(),
GetTotalBytes(),
GetState(),
+ GetLastReason(),
GetDbHandle(),
GetOpened());
}

Powered by Google App Engine
This is Rietveld 408576698