feat: migrate webRequest module to NetworkService (Part 2) (#19338)

* handlers => intercepted_handlers

* Add stub for InProgressRequest

* Add stub for webRequest.onBeforeRequest/onBeforeSendHeaders/onSendHeaders

* Add stub for webRequest.onCompleted/onHeadersReceived

* Add stub for webRequest.onResponseStarted

* Add comment for the class
This commit is contained in:
Cheng Zhao 2019-07-23 07:01:45 +09:00 committed by Robo
parent d45694dcb0
commit eb6660f534
3 changed files with 782 additions and 13 deletions

View file

@ -998,9 +998,16 @@ bool AtomBrowserClient::WillCreateURLLoaderFactory(
auto proxied_request = std::move(*factory_request);
network::mojom::URLLoaderFactoryPtrInfo target_factory_info;
*factory_request = mojo::MakeRequest(&target_factory_info);
new ProxyingURLLoaderFactory(protocol->intercept_handlers(),
std::move(proxied_request),
std::move(target_factory_info));
network::mojom::TrustedURLLoaderHeaderClientRequest header_client_request;
if (header_client)
header_client_request = mojo::MakeRequest(header_client);
new ProxyingURLLoaderFactory(
protocol->intercept_handlers(), std::move(proxied_request),
std::move(target_factory_info), std::move(header_client_request));
*bypass_redirect_checks = true;
return true;
}