Commit 62855fe8 authored by Nick Carter's avatar Nick Carter Committed by Commit Bot

Remove origin_pid from content/browser/download

(Split off from https://chromium-review.googlesource.com/738324 )

Bug: 
Change-Id: Ic5bbbc3945ffea90a5d0cfb47393048025390f3d
Reviewed-on: https://chromium-review.googlesource.com/794064
Commit-Queue: Nick Carter <nick@chromium.org>
Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519921}
parent 202cd8ea
......@@ -194,8 +194,9 @@ DownloadManagerImpl::UniqueUrlDownloadHandlerPtr BeginResourceDownload(
return nullptr;
}
ResourceRequestInfo::WebContentsGetter getter = base::Bind(
&GetWebContents, request->origin_pid, request->render_frame_id, -1);
ResourceRequestInfo::WebContentsGetter getter =
base::Bind(&GetWebContents, params->render_process_host_id(),
params->render_frame_host_routing_id(), -1);
// TODO(qinmin): Check the storage permission before creating the URLLoader.
// This is already done for context menu download, but it is missing for
// download service and download resumption.
......@@ -223,8 +224,8 @@ void InterceptNavigationResponse(
GURL url = resource_request->url;
std::string method = resource_request->method;
ResourceRequestInfo::WebContentsGetter getter =
base::Bind(&GetWebContents, resource_request->origin_pid,
resource_request->render_frame_id, frame_tree_node_id);
base::Bind(&GetWebContents, ChildProcessHost::kInvalidUniqueID,
MSG_ROUTING_NONE, frame_tree_node_id);
std::unique_ptr<ResourceDownloader> resource_downloader =
ResourceDownloader::CreateWithURLLoader(
download_manager, std::move(resource_request), getter,
......
......@@ -174,10 +174,8 @@ std::unique_ptr<ResourceRequest> CreateResourceRequest(
request->allow_download = true;
request->is_main_frame = true;
if (params->render_process_host_id() >= 0) {
request->origin_pid = params->render_process_host_id();
if (params->render_process_host_id() >= 0)
request->render_frame_id = params->render_frame_host_routing_id();
}
bool has_upload_data = false;
if (!params->post_body().empty()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment