Skip to content

Commit

Permalink
feat: migrate webRequest module to NetworkService (Part 2) (#19338)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
zcbenz authored and deepak1556 committed Jul 22, 2019
1 parent d45694d commit eb6660f
Show file tree
Hide file tree
Showing 3 changed files with 782 additions and 13 deletions.
13 changes: 10 additions & 3 deletions shell/browser/atom_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit eb6660f

Please sign in to comment.