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

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

Issue 2703883003: Read and restore persisted slice info (Closed)
Patch Set: Created 3 years, 10 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_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index ccb9aaaf0deacd59c092df337c86b04ca8af2ba6..983e26ae07cec13d81b500b4af0a86ed63977cb3 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -141,13 +141,14 @@ class DownloadItemFactoryImpl : public DownloadItemFactory {
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
bool opened,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices,
const net::NetLogWithSource& net_log) override {
return new DownloadItemImpl(
delegate, guid, download_id, current_path, target_path, url_chain,
referrer_url, site_url, tab_url, tab_refererr_url, mime_type,
original_mime_type, start_time, end_time, etag, last_modified,
received_bytes, total_bytes, hash, state, danger_type, interrupt_reason,
- opened, net_log);
+ opened, received_slices, net_log);
}
DownloadItemImpl* CreateActiveItem(
@@ -658,7 +659,8 @@ DownloadItem* DownloadManagerImpl::CreateDownloadItem(
DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
- bool opened) {
+ bool opened,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices) {
if (base::ContainsKey(downloads_, id)) {
NOTREACHED();
return nullptr;
@@ -668,7 +670,7 @@ DownloadItem* DownloadManagerImpl::CreateDownloadItem(
this, guid, id, current_path, target_path, url_chain, referrer_url,
site_url, tab_url, tab_refererr_url, mime_type, original_mime_type,
start_time, end_time, etag, last_modified, received_bytes, total_bytes,
- hash, state, danger_type, interrupt_reason, opened,
+ hash, state, danger_type, interrupt_reason, opened, received_slices,
net::NetLogWithSource::Make(net_log_, net::NetLogSourceType::DOWNLOAD));
downloads_[id] = base::WrapUnique(item);
downloads_by_guid_[guid] = item;
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | content/browser/download/download_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698