Commit 655685ff authored by Charlie Reis's avatar Charlie Reis Committed by Commit Bot

Store response on NavigationRequest earlier.

This allows it to be accessed during GetFrameHostForNavigation, which
is important for making process model decisions based on headers.

BUG=922191

Change-Id: I6e8d2ce0f56ef5329f2b8c84d7d09337524dde89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1592127Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
Commit-Queue: Charlie Reis <creis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#656478}
parent e27ac124
...@@ -1319,6 +1319,8 @@ void NavigationRequest::OnResponseStarted( ...@@ -1319,6 +1319,8 @@ void NavigationRequest::OnResponseStarted(
TRACE_EVENT_ASYNC_STEP_INTO0("navigation", "NavigationRequest", this, TRACE_EVENT_ASYNC_STEP_INTO0("navigation", "NavigationRequest", this,
"OnResponseStarted"); "OnResponseStarted");
state_ = RESPONSE_STARTED; state_ = RESPONSE_STARTED;
response_ = response;
ssl_info_ = response->head.ssl_info;
// Check if the response should be sent to a renderer. // Check if the response should be sent to a renderer.
response_should_be_rendered_ = response_should_be_rendered_ =
...@@ -1430,11 +1432,8 @@ void NavigationRequest::OnResponseStarted( ...@@ -1430,11 +1432,8 @@ void NavigationRequest::OnResponseStarted(
common_params_.previews_state, navigation_handle_.get(), common_params_.previews_state, navigation_handle_.get(),
response->head.headers.get()); response->head.headers.get());
// Store the response and the URLLoaderClient endpoints until checks have been // Store the URLLoaderClient endpoints until checks have been processed.
// processed.
response_ = response;
url_loader_client_endpoints_ = std::move(url_loader_client_endpoints); url_loader_client_endpoints_ = std::move(url_loader_client_endpoints);
ssl_info_ = response->head.ssl_info;
subresource_loader_params_ = std::move(subresource_loader_params); subresource_loader_params_ = std::move(subresource_loader_params);
......
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