Update to Chromium version 81.0.4044.0 (#737173)

This commit is contained in:
Marshall Greenblatt
2020-03-03 19:29:39 -05:00
parent a22b670a00
commit 9d9ee8b45f
135 changed files with 2602 additions and 1329 deletions

View File

@ -280,7 +280,7 @@ class CefBrowserURLRequest::Context
// Associate the request with |request_id|.
request_id_ = request_id;
loader_->SetRequestId(request_id);
loader_->SetRequestID(request_id);
g_manager.Get().Add(request_id, url_request_, client_);
if (request_body) {

View File

@ -15,7 +15,6 @@
#include "net/cookies/cookie_util.h"
#include "services/network/cookie_manager.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/resource_response.h"
namespace net_service {
@ -169,14 +168,14 @@ void LoadCookies(content::BrowserContext* browser_context,
void SaveCookies(content::BrowserContext* browser_context,
const network::ResourceRequest& request,
const network::ResourceResponseHead& head,
net::HttpResponseHeaders* headers,
const AllowCookieCallback& allow_cookie_callback,
DoneCookieCallback done_callback) {
CEF_REQUIRE_IOT();
if (request.credentials_mode == network::mojom::CredentialsMode::kOmit ||
request.url.IsAboutBlank() || !head.headers ||
!head.headers->HasHeader(net_service::kHTTPSetCookieHeaderName)) {
request.url.IsAboutBlank() || !headers ||
!headers->HasHeader(net_service::kHTTPSetCookieHeaderName)) {
// Continue immediately without saving cookies.
std::move(done_callback).Run(0, {});
return;
@ -185,7 +184,7 @@ void SaveCookies(content::BrowserContext* browser_context,
// Match the logic in
// URLRequestHttpJob::SaveCookiesAndNotifyHeadersComplete.
base::Time response_date;
if (!head.headers->GetDateValue(&response_date))
if (!headers->GetDateValue(&response_date))
response_date = base::Time();
net::CookieOptions options;
@ -201,7 +200,7 @@ void SaveCookies(content::BrowserContext* browser_context,
net::CookieList allowed_cookies;
int total_count = 0;
while (head.headers->EnumerateHeader(&iter, name, &cookie_string)) {
while (headers->EnumerateHeader(&iter, name, &cookie_string)) {
total_count++;
net::CanonicalCookie::CookieInclusionStatus returned_status;

View File

@ -12,9 +12,12 @@ namespace content {
class BrowserContext;
}
namespace net {
class HttpResponseHeaders;
}
namespace network {
struct ResourceRequest;
struct ResourceResponseHead;
} // namespace network
namespace net_service {
@ -45,7 +48,7 @@ void LoadCookies(content::BrowserContext* browser_context,
// on the IO thread.
void SaveCookies(content::BrowserContext* browser_context,
const network::ResourceRequest& request,
const network::ResourceResponseHead& head,
net::HttpResponseHeaders* headers,
const AllowCookieCallback& allow_cookie_callback,
DoneCookieCallback done_callback);

View File

@ -11,7 +11,7 @@
#include "base/barrier_closure.h"
#include "base/strings/string_number_conversions.h"
#include "components/safe_browsing/common/safebrowsing_constants.h"
#include "components/safe_browsing/core/common/safebrowsing_constants.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/resource_context.h"
@ -245,7 +245,8 @@ class InterceptedRequest : public network::mojom::URLLoader,
bool waiting_for_upload_progress_ack_ = false;
network::ResourceRequest request_;
network::ResourceResponseHead current_response_;
network::mojom::URLResponseHeadPtr current_response_;
scoped_refptr<net::HttpResponseHeaders> current_headers_;
scoped_refptr<net::HttpResponseHeaders> override_headers_;
GURL original_url_;
GURL redirect_url_;
@ -426,16 +427,15 @@ void InterceptedRequest::OnHeadersReceived(
return;
}
current_response_.headers =
base::MakeRefCounted<net::HttpResponseHeaders>(headers);
current_headers_ = base::MakeRefCounted<net::HttpResponseHeaders>(headers);
on_headers_received_callback_ = std::move(callback);
base::Optional<net::RedirectInfo> redirect_info;
std::string location;
if (current_response_.headers->IsRedirect(&location)) {
if (current_headers_->IsRedirect(&location)) {
const GURL new_url = request_.url.Resolve(location);
redirect_info =
MakeRedirectInfo(request_, current_response_.headers.get(), new_url, 0);
MakeRedirectInfo(request_, current_headers_.get(), new_url, 0);
}
HandleResponseOrRedirectHeaders(
@ -448,16 +448,16 @@ void InterceptedRequest::OnHeadersReceived(
void InterceptedRequest::OnReceiveResponse(
network::mojom::URLResponseHeadPtr head) {
current_response_ = std::move(head);
if (current_request_uses_header_client_) {
// Use the headers we got from OnHeadersReceived as that'll contain
// Set-Cookie if it existed.
auto saved_headers = current_response_.headers;
DCHECK(saved_headers);
current_response_ = head;
current_response_.headers = saved_headers;
DCHECK(current_headers_);
current_response_->headers = current_headers_;
current_headers_ = nullptr;
ContinueToResponseStarted(net::OK);
} else {
current_response_ = head;
HandleResponseOrRedirectHeaders(
base::nullopt,
base::BindOnce(&InterceptedRequest::ContinueToResponseStarted,
@ -470,16 +470,15 @@ void InterceptedRequest::OnReceiveRedirect(
network::mojom::URLResponseHeadPtr head) {
bool needs_callback = false;
current_response_ = std::move(head);
if (current_request_uses_header_client_) {
// Use the headers we got from OnHeadersReceived as that'll contain
// Set-Cookie if it existed. May be null for synthetic redirects.
auto saved_headers = current_response_.headers;
current_response_ = head;
if (saved_headers) {
current_response_.headers = saved_headers;
}
DCHECK(current_headers_);
current_response_->headers = current_headers_;
current_headers_ = nullptr;
} else {
current_response_ = head;
needs_callback = true;
}
@ -625,33 +624,35 @@ void InterceptedRequest::InterceptResponseReceived(
DCHECK(!response);
// Perform the redirect.
network::ResourceResponseHead head;
head.request_start = base::TimeTicks::Now();
head.response_start = base::TimeTicks::Now();
head.headers = MakeResponseHeaders(
current_response_ = network::mojom::URLResponseHead::New();
current_response_->request_start = base::TimeTicks::Now();
current_response_->response_start = base::TimeTicks::Now();
auto headers = MakeResponseHeaders(
net::HTTP_TEMPORARY_REDIRECT, std::string(), std::string(),
std::string(), -1, {}, false /* allow_existing_header_override */);
current_response_->headers = headers;
head.encoded_data_length = head.headers->raw_headers().length();
head.content_length = head.encoded_body_length = 0;
current_response_->encoded_data_length = headers->raw_headers().length();
current_response_->content_length = current_response_->encoded_body_length =
0;
std::string origin;
if (request_.headers.GetHeader(net::HttpRequestHeaders::kOrigin, &origin) &&
origin != url::Origin().Serialize()) {
// Allow redirects of cross-origin resource loads.
head.headers->AddHeader(MakeHeader(
headers->AddHeader(MakeHeader(
network::cors::header_names::kAccessControlAllowOrigin, origin));
}
if (request_.credentials_mode ==
network::mojom::CredentialsMode::kInclude) {
head.headers->AddHeader(MakeHeader(
headers->AddHeader(MakeHeader(
network::cors::header_names::kAccessControlAllowCredentials, "true"));
}
current_response_ = head;
const net::RedirectInfo& redirect_info =
MakeRedirectInfo(request_, head.headers.get(), request_.url, 0);
MakeRedirectInfo(request_, headers.get(), request_.url, 0);
HandleResponseOrRedirectHeaders(
redirect_info,
base::BindOnce(&InterceptedRequest::ContinueToBeforeRedirect,
@ -715,17 +716,21 @@ void InterceptedRequest::HandleResponseOrRedirectHeaders(
redirect_url_ = redirect_info.has_value() ? redirect_info->new_url : GURL();
original_url_ = request_.url;
// |current_response_| may be nullptr when called from OnHeadersReceived.
auto headers =
current_response_ ? current_response_->headers : current_headers_;
// Even though |head| is const we can get a non-const pointer to the headers
// and modifications we make are passed to the target client.
factory_->request_handler_->ProcessResponseHeaders(
id_, request_, redirect_url_, current_response_);
id_, request_, redirect_url_, headers.get());
// Pause handling of client messages before waiting on an async callback.
if (proxied_client_binding_)
proxied_client_binding_.PauseIncomingMethodCallProcessing();
factory_->request_handler_->OnRequestResponse(
id_, &request_, current_response_, redirect_info,
id_, &request_, headers.get(), redirect_info,
base::BindOnce(&InterceptedRequest::ContinueResponseOrRedirect,
weak_factory_.GetWeakPtr(), std::move(continuation)));
}
@ -749,7 +754,7 @@ void InterceptedRequest::ContinueResponseOrRedirect(
// Make sure to update current_response_, since when OnReceiveResponse
// is called we will not use its headers as it might be missing the
// Set-Cookie line (which gets stripped by the IPC layer).
current_response_.headers = override_headers_;
current_response_->headers = override_headers_;
}
redirect_url_ = redirect_url;
@ -780,21 +785,22 @@ void InterceptedRequest::ContinueToHandleOverrideHeaders(int error_code) {
net::RedirectInfo InterceptedRequest::MakeRedirectResponseAndInfo(
const GURL& new_location) {
// Clear the Content-Type values.
current_response_.mime_type = current_response_.charset = std::string();
current_response_.headers->RemoveHeader(
current_response_->mime_type = current_response_->charset = std::string();
current_response_->headers->RemoveHeader(
net::HttpRequestHeaders::kContentType);
// Clear the Content-Length values.
current_response_.content_length = current_response_.encoded_body_length = 0;
current_response_.headers->RemoveHeader(
current_response_->content_length = current_response_->encoded_body_length =
0;
current_response_->headers->RemoveHeader(
net::HttpRequestHeaders::kContentLength);
current_response_.encoded_data_length =
current_response_.headers->raw_headers().size();
current_response_->encoded_data_length =
current_response_->headers->raw_headers().size();
const net::RedirectInfo& redirect_info = MakeRedirectInfo(
request_, current_response_.headers.get(), new_location, 0);
current_response_.headers->ReplaceStatusLine(
request_, current_response_->headers.get(), new_location, 0);
current_response_->headers->ReplaceStatusLine(
MakeStatusLine(redirect_info.status_code, std::string(), true));
return redirect_info;
@ -824,10 +830,12 @@ void InterceptedRequest::ContinueToBeforeRedirect(
if (redirect_url.is_valid()) {
net::RedirectInfo new_redirect_info = redirect_info;
new_redirect_info.new_url = redirect_url;
target_client_->OnReceiveRedirect(new_redirect_info, current_response_);
target_client_->OnReceiveRedirect(new_redirect_info,
std::move(current_response_));
request_.url = redirect_url;
} else {
target_client_->OnReceiveRedirect(redirect_info, current_response_);
target_client_->OnReceiveRedirect(redirect_info,
std::move(current_response_));
request_.url = redirect_info.new_url;
}
@ -854,8 +862,8 @@ void InterceptedRequest::ContinueToResponseStarted(int error_code) {
std::string location;
const bool is_redirect = redirect_url.is_valid() ||
(current_response_.headers &&
current_response_.headers->IsRedirect(&location));
(current_response_->headers &&
current_response_->headers->IsRedirect(&location));
if (stream_loader_ && is_redirect) {
// Redirecting from OnReceiveResponse generally isn't supported by the
// NetworkService, so we can only support it when using a custom loader.
@ -879,7 +887,7 @@ void InterceptedRequest::ContinueToResponseStarted(int error_code) {
if (proxied_client_binding_)
proxied_client_binding_.ResumeIncomingMethodCallProcessing();
target_client_->OnReceiveResponse(current_response_);
target_client_->OnReceiveResponse(std::move(current_response_));
}
if (stream_loader_)
@ -1012,7 +1020,7 @@ void InterceptedRequestHandler::ShouldInterceptRequest(
void InterceptedRequestHandler::OnRequestResponse(
const RequestId& id,
network::ResourceRequest* request,
const network::ResourceResponseHead& head,
net::HttpResponseHeaders* headers,
base::Optional<net::RedirectInfo> redirect_info,
OnRequestResponseResultCallback callback) {
std::move(callback).Run(

View File

@ -18,7 +18,6 @@
#include "content/public/browser/web_contents.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "services/network/public/cpp/resource_response.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h"
@ -76,11 +75,10 @@ class InterceptedRequestHandler {
// method is called in response to a redirect. Even though |head| is const the
// |head.headers| value is non-const and any changes will be passed to the
// client.
virtual void ProcessResponseHeaders(
const RequestId& id,
const network::ResourceRequest& request,
const GURL& redirect_url,
const network::ResourceResponseHead& head) {}
virtual void ProcessResponseHeaders(const RequestId& id,
const network::ResourceRequest& request,
const GURL& redirect_url,
net::HttpResponseHeaders* headers) {}
enum class ResponseMode {
// Continue the request.
@ -101,7 +99,7 @@ class InterceptedRequestHandler {
virtual void OnRequestResponse(
const RequestId& id,
network::ResourceRequest* request,
const network::ResourceResponseHead& head,
net::HttpResponseHeaders* headers,
base::Optional<net::RedirectInfo> redirect_info,
OnRequestResponseResultCallback callback);

View File

@ -592,7 +592,7 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
new RequestCallbackWrapper(base::BindOnce(
&InterceptedRequestHandlerWrapper::ContinueShouldInterceptRequest,
weak_ptr_factory_.GetWeakPtr(), id, base::Unretained(request),
base::Passed(std::move(callback))));
std::move(callback)));
cef_return_value_t retval = state->handler_->OnBeforeResourceLoad(
init_state_->browser_, init_state_->frame_,
@ -687,11 +687,10 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
std::move(callback).Run(std::move(resource_response));
}
void ProcessResponseHeaders(
const RequestId& id,
const network::ResourceRequest& request,
const GURL& redirect_url,
const network::ResourceResponseHead& head) override {
void ProcessResponseHeaders(const RequestId& id,
const network::ResourceRequest& request,
const GURL& redirect_url,
net::HttpResponseHeaders* headers) override {
CEF_REQUIRE_IOT();
RequestState* state = GetState(id);
@ -708,15 +707,15 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
else
state->pending_response_->SetReadOnly(false);
if (head.headers)
state->pending_response_->SetResponseHeaders(*head.headers);
if (headers)
state->pending_response_->SetResponseHeaders(*headers);
state->pending_response_->SetReadOnly(true);
}
void OnRequestResponse(const RequestId& id,
network::ResourceRequest* request,
const network::ResourceResponseHead& head,
net::HttpResponseHeaders* headers,
base::Optional<net::RedirectInfo> redirect_info,
OnRequestResponseResultCallback callback) override {
CEF_REQUIRE_IOT();
@ -735,7 +734,7 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
if (!state->handler_) {
// Cookies may come from a scheme handler.
MaybeSaveCookies(
id, state, request, head,
id, state, request, headers,
base::BindOnce(
std::move(callback), ResponseMode::CONTINUE, nullptr,
redirect_info.has_value() ? redirect_info->new_url : GURL()));
@ -746,17 +745,17 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
DCHECK(state->pending_response_);
if (redirect_info.has_value()) {
HandleRedirect(id, state, request, head, *redirect_info,
HandleRedirect(id, state, request, headers, *redirect_info,
std::move(callback));
} else {
HandleResponse(id, state, request, head, std::move(callback));
HandleResponse(id, state, request, headers, std::move(callback));
}
}
void HandleRedirect(const RequestId& id,
RequestState* state,
network::ResourceRequest* request,
const network::ResourceResponseHead& head,
net::HttpResponseHeaders* headers,
const net::RedirectInfo& redirect_info,
OnRequestResponseResultCallback callback) {
GURL new_url = redirect_info.new_url;
@ -786,13 +785,13 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
auto exec_callback = base::BindOnce(
std::move(callback), ResponseMode::CONTINUE, nullptr, new_url);
MaybeSaveCookies(id, state, request, head, std::move(exec_callback));
MaybeSaveCookies(id, state, request, headers, std::move(exec_callback));
}
void HandleResponse(const RequestId& id,
RequestState* state,
network::ResourceRequest* request,
const network::ResourceResponseHead& head,
net::HttpResponseHeaders* headers,
OnRequestResponseResultCallback callback) {
// The client may modify |pending_request_| in OnResourceResponse.
state->pending_request_->SetReadOnly(false);
@ -835,13 +834,13 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
return;
}
MaybeSaveCookies(id, state, request, head, std::move(exec_callback));
MaybeSaveCookies(id, state, request, headers, std::move(exec_callback));
}
void MaybeSaveCookies(const RequestId& id,
RequestState* state,
network::ResourceRequest* request,
const network::ResourceResponseHead& head,
net::HttpResponseHeaders* headers,
base::OnceClosure callback) {
CEF_REQUIRE_IOT();
@ -863,7 +862,7 @@ class InterceptedRequestHandlerWrapper : public InterceptedRequestHandler {
auto done_cookie_callback = base::BindOnce(
&InterceptedRequestHandlerWrapper::ContinueWithSavedCookies,
weak_ptr_factory_.GetWeakPtr(), id, std::move(callback));
net_service::SaveCookies(init_state_->browser_context_, *request, head,
net_service::SaveCookies(init_state_->browser_context_, *request, headers,
allow_cookie_callback,
std::move(done_cookie_callback));
}

View File

@ -420,8 +420,8 @@ void InputStreamReader::RunSkipCallback(int64_t bytes_skipped) {
DCHECK(!pending_skip_callback_.is_null());
job_thread_task_runner_->PostTask(
FROM_HERE,
base::Bind(InputStreamReader::RunSkipCallbackOnJobThread, bytes_skipped,
base::Passed(std::move(pending_skip_callback_))));
base::BindOnce(InputStreamReader::RunSkipCallbackOnJobThread,
bytes_skipped, std::move(pending_skip_callback_)));
// Reset callback state.
pending_callback_id_ = -1;
@ -433,9 +433,8 @@ void InputStreamReader::RunReadCallback(int bytes_read) {
DCHECK(!pending_read_callback_.is_null());
job_thread_task_runner_->PostTask(
FROM_HERE,
base::Bind(InputStreamReader::RunReadCallbackOnJobThread, bytes_read,
base::Passed(std::move(pending_read_callback_))));
FROM_HERE, base::BindOnce(InputStreamReader::RunReadCallbackOnJobThread,
bytes_read, std::move(pending_read_callback_)));
// Reset callback state.
pending_callback_id_ = -1;
@ -640,32 +639,38 @@ void StreamReaderURLLoader::HeadersComplete(int orig_status_code,
return;
}
pending_response_.request_start = base::TimeTicks::Now();
pending_response_.response_start = base::TimeTicks::Now();
pending_response_.headers = MakeResponseHeaders(
auto pending_response = network::mojom::URLResponseHead::New();
pending_response->request_start = base::TimeTicks::Now();
pending_response->response_start = base::TimeTicks::Now();
auto headers = MakeResponseHeaders(
status_code, status_text, mime_type, charset, content_length,
extra_headers, false /* allow_existing_header_override */);
pending_response->headers = headers;
if (content_length >= 0)
pending_response_.content_length = content_length;
pending_response->content_length = content_length;
if (!mime_type.empty()) {
pending_response_.mime_type = mime_type;
pending_response->mime_type = mime_type;
if (!charset.empty())
pending_response_.charset = charset;
pending_response->charset = charset;
}
if (header_client_.is_bound()) {
header_client_->OnHeadersReceived(
pending_response_.headers->raw_headers(), net::IPEndPoint(),
headers->raw_headers(), net::IPEndPoint(),
base::BindOnce(&StreamReaderURLLoader::ContinueWithResponseHeaders,
weak_factory_.GetWeakPtr()));
weak_factory_.GetWeakPtr(),
std::move(pending_response)));
} else {
ContinueWithResponseHeaders(net::OK, base::nullopt, GURL());
ContinueWithResponseHeaders(std::move(pending_response), net::OK,
base::nullopt, base::nullopt);
}
}
void StreamReaderURLLoader::ContinueWithResponseHeaders(
network::mojom::URLResponseHeadPtr pending_response,
int32_t result,
const base::Optional<std::string>& headers,
const base::Optional<GURL>& redirect_url) {
@ -676,34 +681,35 @@ void StreamReaderURLLoader::ContinueWithResponseHeaders(
if (headers) {
DCHECK(header_client_.is_bound());
pending_response_.headers =
pending_response->headers =
base::MakeRefCounted<net::HttpResponseHeaders>(*headers);
}
auto pending_headers = pending_response->headers;
// What the length would be if we sent headers over the network. Used to
// calculate data length.
header_length_ = pending_response_.headers->raw_headers().length();
header_length_ = pending_headers->raw_headers().length();
DCHECK(client_.is_bound());
std::string location;
const auto has_redirect_url = redirect_url && !redirect_url->is_empty();
if (has_redirect_url || pending_response_.headers->IsRedirect(&location)) {
pending_response_.encoded_data_length = header_length_;
pending_response_.content_length = pending_response_.encoded_body_length =
if (has_redirect_url || pending_headers->IsRedirect(&location)) {
pending_response->encoded_data_length = header_length_;
pending_response->content_length = pending_response->encoded_body_length =
0;
const GURL new_location =
has_redirect_url ? *redirect_url : request_.url.Resolve(location);
client_->OnReceiveRedirect(
MakeRedirectInfo(request_, pending_response_.headers.get(),
new_location,
pending_response_.headers->response_code()),
pending_response_);
MakeRedirectInfo(request_, pending_headers.get(), new_location,
pending_headers->response_code()),
std::move(pending_response));
// The client will restart the request with a new loader.
// |this| will be deleted.
CleanUp();
} else {
client_->OnReceiveResponse(pending_response_);
client_->OnReceiveResponse(std::move(pending_response));
}
}

View File

@ -13,9 +13,9 @@
#include "mojo/public/cpp/system/simple_watcher.h"
#include "net/http/http_byte_range.h"
#include "services/network/public/cpp/net_adapters.h"
#include "services/network/public/cpp/resource_response.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "services/network/public/mojom/url_loader.mojom.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
namespace net_service {
@ -188,9 +188,11 @@ class StreamReaderURLLoader : public network::mojom::URLLoader {
void OnReaderSkipCompleted(int64_t bytes_skipped);
void HeadersComplete(int status_code, int64_t expected_content_length);
void ContinueWithResponseHeaders(int32_t result,
const base::Optional<std::string>& headers,
const base::Optional<GURL>& redirect_url);
void ContinueWithResponseHeaders(
network::mojom::URLResponseHeadPtr pending_response,
int32_t result,
const base::Optional<std::string>& headers,
const base::Optional<GURL>& redirect_url);
void SendBody();
void ReadMore();
@ -205,8 +207,6 @@ class StreamReaderURLLoader : public network::mojom::URLLoader {
const RequestId request_id_;
network::ResourceResponseHead pending_response_;
size_t header_length_ = 0;
int64_t total_bytes_read_ = 0;

View File

@ -64,7 +64,8 @@ scoped_refptr<URLLoaderFactoryGetter> URLLoaderFactoryGetter::Create(
content::ContentBrowserClient::URLLoaderFactoryType::kDocumentSubResource,
url::Origin(), base::nullopt /* navigation_id */,
&maybe_proxy_factory_request, nullptr /* header_client */,
nullptr /* bypass_redirect_checks */, nullptr /* factory_override */);
nullptr /* bypass_redirect_checks */, nullptr /* disable_secure_dns */,
nullptr /* factory_override */);
// If anyone above indicated that they care about proxying, pass the
// intermediate pipe along to the URLLoaderFactoryGetter.