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

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: Changed ordering of target_path and current_path everywhere to match that of DownloadItemImpl. Created 8 years 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 3be8661979b518b50be4e8fdae1d3d685a428dfa..2ba248c7801f4585aa8ed842d7a1952f0db5ee2f 100644
--- a/content/browser/download/download_item_impl.cc
+++ b/content/browser/download/download_item_impl.cc
@@ -114,29 +114,31 @@ const char DownloadItem::kEmptyFileHash[] = "";
// 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,
+ 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),

Powered by Google App Engine
This is Rietveld 408576698