Commit ae8bc934 authored by Nicolas Arciniega's avatar Nicolas Arciniega Committed by Commit Bot

Rename CreateProxyResolutionServiceUsingMojoFactory

Since this function will only produce a ConfiguredProxyResolutionService
it was decided in a previous change to rename it to:
CreateConfiguredProxyResolutionServiceUsingMojoFactory

Bug: 1032820
Change-Id: I63c64db7e357909337b7eaaf9d3ebf2141505fd6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2112890
Commit-Queue: Nicolas Arciniega <niarci@microsoft.com>
Reviewed-by: default avatarEric Roman <eroman@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752242}
parent 19d387f4
......@@ -18,7 +18,7 @@
namespace network {
std::unique_ptr<net::ConfiguredProxyResolutionService>
CreateProxyResolutionServiceUsingMojoFactory(
CreateConfiguredProxyResolutionServiceUsingMojoFactory(
mojo::PendingRemote<proxy_resolver::mojom::ProxyResolverFactory>
mojo_proxy_factory,
std::unique_ptr<net::ProxyConfigService> proxy_config_service,
......
......@@ -24,8 +24,9 @@ class PacFileFetcher;
namespace network {
// Creates a proxy resolution service that uses |mojo_proxy_factory| to create
// and connect to a Mojo proxy resolver service. This proxy service polls
// |proxy_config_service| to notice when the proxy settings change.
// and connect to a Mojo service for evaluating PAC files
// (ProxyResolverFactory). The proxy service observes |proxy_config_service| to
// notice when the proxy settings change.
//
// |pac_file_fetcher| specifies the dependency to use for downloading
// any PAC scripts.
......@@ -36,12 +37,9 @@ namespace network {
// |host_resolver| points to the host resolving dependency the PAC script
// should use for any DNS queries. It must remain valid throughout the
// lifetime of the ConfiguredProxyResolutionService.
//
// TODO(https://crbug.com/1032820): Rename this to
// CreateConfiguredProxyResolutionServiceUsingMojoFactory.
COMPONENT_EXPORT(NETWORK_SERVICE)
std::unique_ptr<net::ConfiguredProxyResolutionService>
CreateProxyResolutionServiceUsingMojoFactory(
CreateConfiguredProxyResolutionServiceUsingMojoFactory(
mojo::PendingRemote<proxy_resolver::mojom::ProxyResolverFactory>
mojo_proxy_factory,
std::unique_ptr<net::ProxyConfigService> proxy_config_service,
......
......@@ -118,15 +118,16 @@ class ProxyServiceMojoTest : public testing::Test {
mock_host_resolver_.rules()->AddRule("example.com", "1.2.3.4");
fetcher_ = new net::MockPacFileFetcher;
proxy_resolution_service_ = CreateProxyResolutionServiceUsingMojoFactory(
test_mojo_proxy_resolver_factory_.CreateFactoryRemote(),
std::make_unique<net::ProxyConfigServiceFixed>(
net::ProxyConfigWithAnnotation(
net::ProxyConfig::CreateFromCustomPacURL(GURL(kPacUrl)),
TRAFFIC_ANNOTATION_FOR_TESTS)),
base::WrapUnique(fetcher_),
std::make_unique<net::DoNothingDhcpPacFileFetcher>(),
&mock_host_resolver_, &net_log_, &network_delegate_);
proxy_resolution_service_ =
CreateConfiguredProxyResolutionServiceUsingMojoFactory(
test_mojo_proxy_resolver_factory_.CreateFactoryRemote(),
std::make_unique<net::ProxyConfigServiceFixed>(
net::ProxyConfigWithAnnotation(
net::ProxyConfig::CreateFromCustomPacURL(GURL(kPacUrl)),
TRAFFIC_ANNOTATION_FOR_TESTS)),
base::WrapUnique(fetcher_),
std::make_unique<net::DoNothingDhcpPacFileFetcher>(),
&mock_host_resolver_, &net_log_, &network_delegate_);
}
base::test::TaskEnvironment task_environment_;
......
......@@ -67,7 +67,7 @@ URLRequestContextBuilderMojo::CreateProxyResolutionService(
std::unique_ptr<net::PacFileFetcherImpl> pac_file_fetcher;
pac_file_fetcher = net::PacFileFetcherImpl::Create(url_request_context);
return CreateProxyResolutionServiceUsingMojoFactory(
return CreateConfiguredProxyResolutionServiceUsingMojoFactory(
std::move(mojo_proxy_resolver_factory_),
std::move(proxy_config_service), std::move(pac_file_fetcher),
std::move(dhcp_pac_file_fetcher), host_resolver, net_log,
......
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