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

Unified Diff: content/public/test/mock_download_manager.cc

Issue 2720613002: Downloads: Added transient flag to download item and download database (Closed)
Patch Set: fix tests Created 3 years, 9 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 24a76e26fc9ffe391528fc97a8895b00143759ed..d2ec14046ca395f07c961d32c69869d889d3d548 100644
--- a/content/public/test/mock_download_manager.cc
+++ b/content/public/test/mock_download_manager.cc
@@ -33,6 +33,7 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
DownloadInterruptReason interrupt_reason,
bool opened,
base::Time last_access_time,
+ bool transient,
const std::vector<DownloadItem::ReceivedSlice>& received_slices)
: guid(guid),
id(id),
@@ -55,6 +56,7 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
interrupt_reason(interrupt_reason),
opened(opened),
last_access_time(last_access_time),
+ transient(transient),
received_slices(received_slices) {}
MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
@@ -79,6 +81,7 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
interrupt_reason(rhs.interrupt_reason),
opened(rhs.opened),
last_access_time(rhs.last_access_time),
+ transient(rhs.transient),
received_slices(rhs.received_slices) {}
MockDownloadManager::CreateDownloadItemAdapter::~CreateDownloadItemAdapter() {}
@@ -97,7 +100,7 @@ bool MockDownloadManager::CreateDownloadItemAdapter::operator==(
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 &&
- last_access_time == rhs.last_access_time &&
+ last_access_time == rhs.last_access_time && transient == rhs.transient &&
received_slices == rhs.received_slices);
}
@@ -136,12 +139,14 @@ DownloadItem* MockDownloadManager::CreateDownloadItem(
DownloadInterruptReason interrupt_reason,
bool opened,
base::Time last_access_time,
+ bool transient,
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, last_access_time, received_slices);
+ danger_type, interrupt_reason, opened, last_access_time, transient,
+ 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