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

Unified Diff: content/browser/download/download_resource_handler.cc

Issue 1728583002: Simplify DownloadRequestHandle by using WebContentsGetter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/browser/download/download_resource_handler.cc
diff --git a/content/browser/download/download_resource_handler.cc b/content/browser/download/download_resource_handler.cc
index a432ce5eedf8080f53b8eb6dfb1ebc7ada7c5972..30a7c8cf02997eb1a2f74a26004e79a90854dc78 100644
--- a/content/browser/download/download_resource_handler.cc
+++ b/content/browser/download/download_resource_handler.cc
@@ -95,12 +95,11 @@ DownloadResourceHandler::DownloadResourceHandler(net::URLRequest* request)
const ResourceRequestInfoImpl* request_info = GetRequestInfo();
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- base::Bind(&InitializeDownloadTabInfoOnUIThread,
- DownloadRequestHandle(AsWeakPtr(), request_info->GetChildID(),
- request_info->GetRouteID(),
- request_info->GetRequestID(),
- request_info->frame_tree_node_id()),
- tab_info_.get()));
+ base::Bind(
+ &InitializeDownloadTabInfoOnUIThread,
+ DownloadRequestHandle(AsWeakPtr(),
+ request_info->GetWebContentsGetterForRequest()),
+ tab_info_.get()));
}
DownloadResourceHandler::~DownloadResourceHandler() {
@@ -188,8 +187,7 @@ void DownloadResourceHandler::OnStart(
create_info->transition_type = request_info->GetPageTransition();
create_info->request_handle.reset(new DownloadRequestHandle(
- AsWeakPtr(), request_info->GetChildID(), request_info->GetRouteID(),
- request_info->GetRequestID(), request_info->frame_tree_node_id()));
+ AsWeakPtr(), request_info->GetWebContentsGetterForRequest()));
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698