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

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

Issue 2705283003: Added last_access_time to DownloadItem and History DB (Closed)
Patch Set: rebase origin/master 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 8dca9b2916d1e8a885b821b625d7f7c0cb87de47..24a76e26fc9ffe391528fc97a8895b00143759ed 100644
--- a/content/public/test/mock_download_manager.cc
+++ b/content/public/test/mock_download_manager.cc
@@ -21,8 +21,8 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
const GURL& tab_referrer_url,
const std::string& mime_type,
const std::string& original_mime_type,
- const base::Time& start_time,
- const base::Time& end_time,
+ base::Time start_time,
+ base::Time end_time,
const std::string& etag,
const std::string& last_modified,
int64_t received_bytes,
@@ -32,6 +32,7 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
bool opened,
+ base::Time last_access_time,
const std::vector<DownloadItem::ReceivedSlice>& received_slices)
: guid(guid),
id(id),
@@ -53,6 +54,7 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
danger_type(danger_type),
interrupt_reason(interrupt_reason),
opened(opened),
+ last_access_time(last_access_time),
received_slices(received_slices) {}
MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
@@ -76,6 +78,7 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
danger_type(rhs.danger_type),
interrupt_reason(rhs.interrupt_reason),
opened(rhs.opened),
+ last_access_time(rhs.last_access_time),
received_slices(rhs.received_slices) {}
MockDownloadManager::CreateDownloadItemAdapter::~CreateDownloadItemAdapter() {}
@@ -94,6 +97,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 &&
received_slices == rhs.received_slices);
}
@@ -120,8 +124,8 @@ DownloadItem* MockDownloadManager::CreateDownloadItem(
const GURL& tab_referrer_url,
const std::string& mime_type,
const std::string& original_mime_type,
- const base::Time& start_time,
- const base::Time& end_time,
+ base::Time start_time,
+ base::Time end_time,
const std::string& etag,
const std::string& last_modified,
int64_t received_bytes,
@@ -131,12 +135,13 @@ DownloadItem* MockDownloadManager::CreateDownloadItem(
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
bool opened,
+ base::Time last_access_time,
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, received_slices);
+ danger_type, interrupt_reason, opened, last_access_time, 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