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

Unified Diff: content/public/test/mock_download_manager.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
« no previous file with comments | « content/public/test/mock_download_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/mock_download_manager.cc
diff --git a/content/public/test/mock_download_manager.cc b/content/public/test/mock_download_manager.cc
index cc2d625e187011cb980015606a9b7165c009fdac..8dca9b2916d1e8a885b821b625d7f7c0cb87de47 100644
--- a/content/public/test/mock_download_manager.cc
+++ b/content/public/test/mock_download_manager.cc
@@ -31,7 +31,8 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
- bool opened)
+ bool opened,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices)
: guid(guid),
id(id),
current_path(current_path),
@@ -51,7 +52,8 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
state(state),
danger_type(danger_type),
interrupt_reason(interrupt_reason),
- opened(opened) {}
+ opened(opened),
+ received_slices(received_slices) {}
MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
const CreateDownloadItemAdapter& rhs)
@@ -73,7 +75,8 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
state(rhs.state),
danger_type(rhs.danger_type),
interrupt_reason(rhs.interrupt_reason),
- opened(rhs.opened) {}
+ opened(rhs.opened),
+ received_slices(rhs.received_slices) {}
MockDownloadManager::CreateDownloadItemAdapter::~CreateDownloadItemAdapter() {}
@@ -90,7 +93,8 @@ bool MockDownloadManager::CreateDownloadItemAdapter::operator==(
etag == rhs.etag && last_modified == rhs.last_modified &&
received_bytes == rhs.received_bytes && total_bytes == rhs.total_bytes &&
state == rhs.state && danger_type == rhs.danger_type &&
- interrupt_reason == rhs.interrupt_reason && opened == rhs.opened);
+ interrupt_reason == rhs.interrupt_reason && opened == rhs.opened &&
+ received_slices == rhs.received_slices);
}
MockDownloadManager::MockDownloadManager() {}
@@ -126,12 +130,13 @@ DownloadItem* MockDownloadManager::CreateDownloadItem(
DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
- bool opened) {
+ bool opened,
+ const std::vector<DownloadItem::ReceivedSlice>& received_slices) {
CreateDownloadItemAdapter adapter(
guid, id, current_path, target_path, url_chain, referrer_url, site_url,
tab_url, tab_referrer_url, mime_type, original_mime_type, start_time,
end_time, etag, last_modified, received_bytes, total_bytes, hash, state,
- danger_type, interrupt_reason, opened);
+ danger_type, interrupt_reason, opened, received_slices);
return MockCreateDownloadItem(adapter);
}
« no previous file with comments | « content/public/test/mock_download_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698