diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 21:37:12 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-27 21:37:12 +0000 |
commit | 6104ea5d0b3eb19a923ae94a5f7fcae8e0e091e2 (patch) | |
tree | 93a11c09778f638718cd19be3249e54defd1f90f /net/http | |
parent | 418e953e7285de2f29f6523c741cbca951f26562 (diff) | |
download | chromium_src-6104ea5d0b3eb19a923ae94a5f7fcae8e0e091e2.zip chromium_src-6104ea5d0b3eb19a923ae94a5f7fcae8e0e091e2.tar.gz chromium_src-6104ea5d0b3eb19a923ae94a5f7fcae8e0e091e2.tar.bz2 |
Stop refcounting ProxyService.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6873096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_network_layer_unittest.cc | 6 | ||||
-rw-r--r-- | net/http/http_network_session.h | 2 | ||||
-rw-r--r-- | net/http/http_network_transaction_unittest.cc | 12 | ||||
-rw-r--r-- | net/http/http_proxy_client_socket_pool_unittest.cc | 4 | ||||
-rw-r--r-- | net/http/http_response_body_drainer_unittest.cc | 6 | ||||
-rw-r--r-- | net/http/http_stream_factory_impl_unittest.cc | 4 |
6 files changed, 17 insertions, 17 deletions
diff --git a/net/http/http_network_layer_unittest.cc b/net/http/http_network_layer_unittest.cc index 5120fac..3bd6db8 100644 --- a/net/http/http_network_layer_unittest.cc +++ b/net/http/http_network_layer_unittest.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. @@ -28,7 +28,7 @@ class HttpNetworkLayerTest : public PlatformTest { session_params.client_socket_factory = &mock_socket_factory_; session_params.host_resolver = &host_resolver_; session_params.cert_verifier = &cert_verifier_; - session_params.proxy_service = proxy_service_; + session_params.proxy_service = proxy_service_.get(); session_params.ssl_config_service = ssl_config_service_; network_session_ = new HttpNetworkSession(session_params); factory_.reset(new HttpNetworkLayer(network_session_)); @@ -37,7 +37,7 @@ class HttpNetworkLayerTest : public PlatformTest { MockClientSocketFactory mock_socket_factory_; MockHostResolver host_resolver_; CertVerifier cert_verifier_; - const scoped_refptr<ProxyService> proxy_service_; + const scoped_ptr<ProxyService> proxy_service_; const scoped_refptr<SSLConfigService> ssl_config_service_; scoped_refptr<HttpNetworkSession> network_session_; scoped_ptr<HttpNetworkLayer> factory_; diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h index 14b85ae..1efc302 100644 --- a/net/http/http_network_session.h +++ b/net/http/http_network_session.h @@ -161,7 +161,7 @@ class HttpNetworkSession : public base::RefCounted<HttpNetworkSession>, HttpAuthHandlerFactory* const http_auth_handler_factory_; // Not const since it's modified by HttpNetworkSessionPeer for testing. - scoped_refptr<ProxyService> proxy_service_; + ProxyService* proxy_service_; const scoped_refptr<SSLConfigService> ssl_config_service_; HttpAuthCache http_auth_cache_; diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index db490c1..64d53ba 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc @@ -94,7 +94,7 @@ struct SessionDependencies { scoped_ptr<MockHostResolverBase> host_resolver; scoped_ptr<CertVerifier> cert_verifier; - scoped_refptr<ProxyService> proxy_service; + scoped_ptr<ProxyService> proxy_service; scoped_refptr<SSLConfigService> ssl_config_service; MockClientSocketFactory socket_factory; scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory; @@ -106,7 +106,7 @@ HttpNetworkSession* CreateSession(SessionDependencies* session_deps) { params.client_socket_factory = &session_deps->socket_factory; params.host_resolver = session_deps->host_resolver.get(); params.cert_verifier = session_deps->cert_verifier.get(); - params.proxy_service = session_deps->proxy_service; + params.proxy_service = session_deps->proxy_service.get(); params.ssl_config_service = session_deps->ssl_config_service; params.http_auth_handler_factory = session_deps->http_auth_handler_factory.get(); @@ -7410,10 +7410,10 @@ TEST_F(HttpNetworkTransactionTest, GenerateAuthToken) { auth_factory->set_mock_handler(auth_handler, HttpAuth::AUTH_SERVER); } if (test_config.proxy_url) { - session_deps.proxy_service = - ProxyService::CreateFixed(test_config.proxy_url); + session_deps.proxy_service.reset( + ProxyService::CreateFixed(test_config.proxy_url)); } else { - session_deps.proxy_service = ProxyService::CreateDirect(); + session_deps.proxy_service.reset(ProxyService::CreateDirect()); } HttpRequestInfo request; @@ -7489,7 +7489,7 @@ TEST_F(HttpNetworkTransactionTest, MultiRoundAuth) { HttpAuthHandlerMock::Factory* auth_factory( new HttpAuthHandlerMock::Factory()); session_deps.http_auth_handler_factory.reset(auth_factory); - session_deps.proxy_service = ProxyService::CreateDirect(); + session_deps.proxy_service.reset(ProxyService::CreateDirect()); session_deps.host_resolver->rules()->AddRule("www.example.com", "10.0.0.1"); session_deps.host_resolver->set_synchronous_mode(true); diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc index fb6bef0..febd4c4 100644 --- a/net/http/http_proxy_client_socket_pool_unittest.cc +++ b/net/http/http_proxy_client_socket_pool_unittest.cc @@ -180,7 +180,7 @@ class HttpProxyClientSocketPoolTest : public TestWithHttpParam { HttpNetworkSession::Params params; params.host_resolver = &host_resolver_; params.cert_verifier = &cert_verifier_; - params.proxy_service = proxy_service_; + params.proxy_service = proxy_service_.get(); params.client_socket_factory = &socket_factory_; params.ssl_config_service = ssl_config_service_; params.http_auth_handler_factory = http_auth_handler_factory_.get(); @@ -198,7 +198,7 @@ class HttpProxyClientSocketPoolTest : public TestWithHttpParam { ClientSocketPoolHistograms ssl_histograms_; MockHostResolver host_resolver_; CertVerifier cert_verifier_; - const scoped_refptr<ProxyService> proxy_service_; + const scoped_ptr<ProxyService> proxy_service_; const scoped_refptr<SSLConfigService> ssl_config_service_; SSLClientSocketPool ssl_socket_pool_; diff --git a/net/http/http_response_body_drainer_unittest.cc b/net/http/http_response_body_drainer_unittest.cc index ea9d299..9feed17 100644 --- a/net/http/http_response_body_drainer_unittest.cc +++ b/net/http/http_response_body_drainer_unittest.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. @@ -185,12 +185,12 @@ class HttpResponseBodyDrainerTest : public testing::Test { HttpNetworkSession* CreateNetworkSession() const { HttpNetworkSession::Params params; - params.proxy_service = proxy_service_; + params.proxy_service = proxy_service_.get(); params.ssl_config_service = ssl_config_service_; return new HttpNetworkSession(params); } - scoped_refptr<ProxyService> proxy_service_; + scoped_ptr<ProxyService> proxy_service_; scoped_refptr<SSLConfigService> ssl_config_service_; const scoped_refptr<HttpNetworkSession> session_; CloseResultWaiter result_waiter_; diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc index b37c173..3b76958 100644 --- a/net/http/http_stream_factory_impl_unittest.cc +++ b/net/http/http_stream_factory_impl_unittest.cc @@ -68,7 +68,7 @@ struct SessionDependencies { scoped_ptr<MockHostResolverBase> host_resolver; scoped_ptr<CertVerifier> cert_verifier; - scoped_refptr<ProxyService> proxy_service; + scoped_ptr<ProxyService> proxy_service; scoped_refptr<SSLConfigService> ssl_config_service; MockClientSocketFactory socket_factory; scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory; @@ -79,7 +79,7 @@ HttpNetworkSession* CreateSession(SessionDependencies* session_deps) { HttpNetworkSession::Params params; params.host_resolver = session_deps->host_resolver.get(); params.cert_verifier = session_deps->cert_verifier.get(); - params.proxy_service = session_deps->proxy_service; + params.proxy_service = session_deps->proxy_service.get(); params.ssl_config_service = session_deps->ssl_config_service; params.client_socket_factory = &session_deps->socket_factory; params.http_auth_handler_factory = |