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

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

Issue 2720613002: Downloads: Added transient flag to download item and download database (Closed)
Patch Set: Fixed migration unit test 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/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 9adacb99a378a074ee4a8ac7c912b0a5d24efe4e..9e18364f12bbb6708ba00c1f716cadd5ead15f30 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,
const base::Time& last_access_time,
+ bool visible,
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),
+ visible(visible),
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),
+ visible(rhs.visible),
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 && visible == rhs.visible &&
received_slices == rhs.received_slices);
}
@@ -136,12 +139,14 @@ DownloadItem* MockDownloadManager::CreateDownloadItem(
DownloadInterruptReason interrupt_reason,
bool opened,
const base::Time& last_access_time,
+ bool visible,
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, visible,
+ received_slices);
return MockCreateDownloadItem(adapter);
}
« content/browser/download/download_item_impl.cc ('K') | « 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