diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/base/host_resolver.h | 12 | ||||
-rw-r--r-- | net/base/host_resolver_impl.cc | 5 | ||||
-rw-r--r-- | net/proxy/proxy_script_fetcher_impl_unittest.cc | 2 | ||||
-rw-r--r-- | net/socket/transport_client_socket_unittest.cc | 2 | ||||
-rw-r--r-- | net/test/test_server.cc | 2 | ||||
-rw-r--r-- | net/tools/fetch/fetch_client.cc | 4 | ||||
-rw-r--r-- | net/url_request/url_request_test_util.cc | 4 |
7 files changed, 15 insertions, 16 deletions
diff --git a/net/base/host_resolver.h b/net/base/host_resolver.h index f16c265..cf32cb0 100644 --- a/net/base/host_resolver.h +++ b/net/base/host_resolver.h @@ -235,13 +235,13 @@ class SingleRequestHostResolver { DISALLOW_COPY_AND_ASSIGN(SingleRequestHostResolver); }; -// Creates a HostResolver implementation using |resolver_proc| as resolver, -// (which if NULL, will default to getaddrinfo() wrapper) that queries the -// underlying system, |max_concurrent_resolves| is how many resolve -// requests will be allowed to run in parallel. Pass -// HostResolver::kDefaultParallelism to choose a default value. +// Creates a HostResolver implementation that queries the underlying system. +// (Except if a unit-test has changed the global HostResolverProc using +// ScopedHostResolverProc to intercept requests to the system). +// |max_concurrent_resolves| is how many resolve requests will be allowed to +// run in parallel. Pass HostResolver::kDefaultParallelism to choose a +// default value. HostResolver* CreateSystemHostResolver(size_t max_concurrent_resolves, - HostResolverProc* resolver_proc, NetLog* net_log); } // namespace net diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc index 894443c..b512561 100644 --- a/net/base/host_resolver_impl.cc +++ b/net/base/host_resolver_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -72,7 +72,6 @@ HostCache* CreateDefaultCache() { } // anonymous namespace HostResolver* CreateSystemHostResolver(size_t max_concurrent_resolves, - HostResolverProc* resolver_proc, NetLog* net_log) { // Maximum of 8 concurrent resolver threads. // Some routers (or resolvers) appear to start to provide host-not-found if @@ -84,7 +83,7 @@ HostResolver* CreateSystemHostResolver(size_t max_concurrent_resolves, max_concurrent_resolves = kDefaultMaxJobs; HostResolverImpl* resolver = - new HostResolverImpl(resolver_proc, CreateDefaultCache(), + new HostResolverImpl(NULL, CreateDefaultCache(), max_concurrent_resolves, net_log); return resolver; diff --git a/net/proxy/proxy_script_fetcher_impl_unittest.cc b/net/proxy/proxy_script_fetcher_impl_unittest.cc index 56cccb1..89db823 100644 --- a/net/proxy/proxy_script_fetcher_impl_unittest.cc +++ b/net/proxy/proxy_script_fetcher_impl_unittest.cc @@ -43,7 +43,7 @@ class RequestContext : public URLRequestContext { ProxyConfig no_proxy; set_host_resolver( CreateSystemHostResolver(HostResolver::kDefaultParallelism, - NULL, NULL)); + NULL)); set_cert_verifier(new CertVerifier); set_proxy_service(ProxyService::CreateFixed(no_proxy)); set_ssl_config_service(new SSLConfigServiceDefaults); diff --git a/net/socket/transport_client_socket_unittest.cc b/net/socket/transport_client_socket_unittest.cc index 26e0f14..837749e 100644 --- a/net/socket/transport_client_socket_unittest.cc +++ b/net/socket/transport_client_socket_unittest.cc @@ -105,7 +105,7 @@ void TransportClientSocketTest::SetUp() { AddressList addr; scoped_ptr<HostResolver> resolver( CreateSystemHostResolver(HostResolver::kDefaultParallelism, - NULL, NULL)); + NULL)); HostResolver::RequestInfo info(HostPortPair("localhost", listen_port_)); int rv = resolver->Resolve(info, &addr, NULL, NULL, BoundNetLog()); CHECK_EQ(rv, OK); diff --git a/net/test/test_server.cc b/net/test/test_server.cc index 2b61ec6..528d08e 100644 --- a/net/test/test_server.cc +++ b/net/test/test_server.cc @@ -192,7 +192,7 @@ bool TestServer::GetAddressList(AddressList* address_list) const { DCHECK(address_list); scoped_ptr<HostResolver> resolver( - CreateSystemHostResolver(HostResolver::kDefaultParallelism, NULL, NULL)); + CreateSystemHostResolver(HostResolver::kDefaultParallelism, NULL)); HostResolver::RequestInfo info(host_port_pair_); int rv = resolver->Resolve(info, address_list, NULL, NULL, BoundNetLog()); if (rv != net::OK) { diff --git a/net/tools/fetch/fetch_client.cc b/net/tools/fetch/fetch_client.cc index e206e49..abff5e6 100644 --- a/net/tools/fetch/fetch_client.cc +++ b/net/tools/fetch/fetch_client.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -139,7 +139,7 @@ int main(int argc, char**argv) { scoped_ptr<net::HostResolver> host_resolver( net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, - NULL, NULL)); + NULL)); scoped_ptr<net::CertVerifier> cert_verifier(new net::CertVerifier); scoped_refptr<net::ProxyService> proxy_service( diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc index f2a7b93..96d1391 100644 --- a/net/url_request/url_request_test_util.cc +++ b/net/url_request/url_request_test_util.cc @@ -41,7 +41,7 @@ TestURLRequestContext::TestURLRequestContext() : ALLOW_THIS_IN_INITIALIZER_LIST(context_storage_(this)) { context_storage_.set_host_resolver( net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, - NULL, NULL)); + NULL)); context_storage_.set_proxy_service(net::ProxyService::CreateDirect()); Init(); } @@ -50,7 +50,7 @@ TestURLRequestContext::TestURLRequestContext(const std::string& proxy) : ALLOW_THIS_IN_INITIALIZER_LIST(context_storage_(this)) { context_storage_.set_host_resolver( net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, - NULL, NULL)); + NULL)); net::ProxyConfig proxy_config; proxy_config.proxy_rules().ParseFromString(proxy); context_storage_.set_proxy_service( |