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

Unified Diff: content/browser/download/download_manager_impl.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
Index: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 9509f54e8a3308d24c0a26822e96c2ce9cb09757..db6bc811fc318d68b4964bbabb864d9fcbc6ba2e 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -120,6 +120,8 @@ class DownloadItemFactoryImpl : public DownloadItemFactory {
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const GURL& tab_url,
+ const GURL& tab_refererr_url,
const std::string& mime_type,
const std::string& original_mime_type,
const base::Time& start_time,
@@ -134,27 +136,11 @@ class DownloadItemFactoryImpl : public DownloadItemFactory {
DownloadInterruptReason interrupt_reason,
bool opened,
const net::BoundNetLog& bound_net_log) override {
- return new DownloadItemImpl(delegate,
- guid,
- download_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,
- bound_net_log);
+ return new DownloadItemImpl(
+ delegate, guid, download_id, current_path, target_path, url_chain,
+ referrer_url, tab_url, tab_refererr_url, mime_type, original_mime_type,
+ start_time, end_time, etag, last_modified, received_bytes, total_bytes,
+ hash, state, danger_type, interrupt_reason, opened, bound_net_log);
}
DownloadItemImpl* CreateActiveItem(
@@ -619,6 +605,8 @@ DownloadItem* DownloadManagerImpl::CreateDownloadItem(
const base::FilePath& target_path,
const std::vector<GURL>& url_chain,
const GURL& referrer_url,
+ const GURL& tab_url,
+ const GURL& tab_refererr_url,
const std::string& mime_type,
const std::string& original_mime_type,
const base::Time& start_time,
@@ -638,26 +626,10 @@ DownloadItem* DownloadManagerImpl::CreateDownloadItem(
}
DCHECK(!ContainsKey(downloads_by_guid_, guid));
DownloadItemImpl* item = item_factory_->CreatePersistedItem(
- this,
- 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,
+ this, guid, id, current_path, target_path, url_chain, referrer_url,
+ tab_url, tab_refererr_url, mime_type, original_mime_type, start_time,
+ end_time, etag, last_modified, received_bytes, total_bytes, hash, state,
+ danger_type, interrupt_reason, opened,
net::BoundNetLog::Make(net_log_, net::NetLog::SOURCE_DOWNLOAD));
downloads_[id] = item;
downloads_by_guid_[guid] = item;
« no previous file with comments | « content/browser/download/download_manager_impl.h ('k') | content/browser/download/download_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698