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

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

Issue 2705283003: Added last_access_time to DownloadItem and History DB (Closed)
Patch Set: Fix tests 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 cc2d625e187011cb980015606a9b7165c009fdac..bec80fc58ad3303be6c150c3c1d2eecd8c2c128f 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 base::Time& last_access_time)
: 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),
+ last_access_time(last_access_time) {}
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),
+ last_access_time(rhs.last_access_time) {}
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 &&
+ last_access_time == rhs.last_access_time);
}
MockDownloadManager::MockDownloadManager() {}
@@ -126,12 +130,13 @@ DownloadItem* MockDownloadManager::CreateDownloadItem(
DownloadItem::DownloadState state,
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
- bool opened) {
+ bool opened,
+ const base::Time& last_access_time) {
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, last_access_time);
return MockCreateDownloadItem(adapter);
}
« content/public/browser/download_item.h ('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