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

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

Issue 1875033005: [Downloads/History] Add tab-url and tab-referrer-url to DownloadRow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guid-fix
Patch Set: Update expectations for DownloadUIController test. Created 4 years, 8 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 8ff5f04b3c5124c9bf4e602317bd9cb05bd1af13..b2bbd6c52205b05f62ba670ced2bd921b06e49f7 100644
--- a/content/public/test/mock_download_manager.cc
+++ b/content/public/test/mock_download_manager.cc
@@ -16,6 +16,8 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const GURL& tab_url,
+ const GURL& tab_referrer_url,
const std::string& mime_type,
const std::string& original_mime_type,
const base::Time& start_time,
@@ -35,6 +37,8 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
target_path(target_path),
url_chain(url_chain),
referrer_url(referrer_url),
+ tab_url(tab_url),
+ tab_referrer_url(tab_referrer_url),
mime_type(mime_type),
original_mime_type(original_mime_type),
start_time(start_time),
@@ -55,6 +59,8 @@ MockDownloadManager::CreateDownloadItemAdapter::CreateDownloadItemAdapter(
target_path(rhs.target_path),
url_chain(rhs.url_chain),
referrer_url(rhs.referrer_url),
+ tab_url(rhs.tab_url),
+ tab_referrer_url(rhs.tab_referrer_url),
start_time(rhs.start_time),
end_time(rhs.end_time),
etag(rhs.etag),
@@ -73,7 +79,8 @@ bool MockDownloadManager::CreateDownloadItemAdapter::operator==(
return (
guid == rhs.guid && id == rhs.id && current_path == rhs.current_path &&
target_path == rhs.target_path && url_chain == rhs.url_chain &&
- referrer_url == rhs.referrer_url && mime_type == rhs.mime_type &&
+ referrer_url == rhs.referrer_url && tab_url == rhs.tab_url &&
+ tab_referrer_url == rhs.tab_referrer_url && mime_type == rhs.mime_type &&
original_mime_type == rhs.original_mime_type &&
start_time == rhs.start_time && end_time == rhs.end_time &&
etag == rhs.etag && last_modified == rhs.last_modified &&
@@ -100,6 +107,8 @@ DownloadItem* MockDownloadManager::CreateDownloadItem(
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const GURL& tab_url,
+ const GURL& tab_referrer_url,
const std::string& mime_type,
const std::string& original_mime_type,
const base::Time& start_time,
@@ -113,25 +122,11 @@ DownloadItem* MockDownloadManager::CreateDownloadItem(
DownloadDangerType danger_type,
DownloadInterruptReason interrupt_reason,
bool opened) {
- CreateDownloadItemAdapter adapter(guid,
- id,
- current_path,
- target_path,
- url_chain,
- 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);
+ CreateDownloadItemAdapter adapter(
+ guid, id, current_path, target_path, url_chain, referrer_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);
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