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

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: Merged to r180302 Created 7 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
« no previous file with comments | « content/browser/download/download_item_impl.h ('k') | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 931f83f5ad2e08d82c710ead7e1458134882a9db..085b7b73e19d1f7410331843ebc8f3457f89e933 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -112,32 +112,35 @@ const int DownloadItemImpl::kMaxAutoResumeAttempts = 5;
// Constructor for reading from the history service.
DownloadItemImpl::DownloadItemImpl(DownloadItemImplDelegate* delegate,
DownloadId download_id,
- const FilePath& path,
- const GURL& url,
+ const FilePath& current_path,
+ const FilePath& target_path,
+ const std::vector<GURL>& url_chain,
const GURL& referrer_url,
const base::Time& start_time,
const base::Time& end_time,
int64 received_bytes,
int64 total_bytes,
DownloadItem::DownloadState state,
+ DownloadDangerType danger_type,
+ DownloadInterruptReason interrupt_reason,
bool opened,
const net::BoundNetLog& bound_net_log)
: is_save_package_download_(false),
download_id_(download_id),
- current_path_(path),
- target_path_(path),
+ current_path_(current_path),
+ target_path_(target_path),
target_disposition_(TARGET_DISPOSITION_OVERWRITE),
- url_chain_(1, url),
+ url_chain_(url_chain),
referrer_url_(referrer_url),
transition_type_(PAGE_TRANSITION_LINK),
has_user_gesture_(false),
total_bytes_(total_bytes),
received_bytes_(received_bytes),
bytes_per_sec_(0),
- last_reason_(DOWNLOAD_INTERRUPT_REASON_NONE),
+ last_reason_(interrupt_reason),
start_tick_(base::TimeTicks()),
state_(ExternalToInternalState(state)),
- danger_type_(DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS),
+ danger_type_(danger_type),
start_time_(start_time),
end_time_(end_time),
delegate_(delegate),
« no previous file with comments | « content/browser/download/download_item_impl.h ('k') | content/browser/download/download_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698