diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 22:06:52 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 22:06:52 +0000 |
commit | 862a92ee0afc1be6470beed3e19465c24da223e2 (patch) | |
tree | dec2efaa94cf3e1eae580599e87f84e7af082594 /net/http/http_network_layer_unittest.cc | |
parent | f816c01e9c6f6f0365ba80ba3f661e38461a0537 (diff) | |
download | chromium_src-862a92ee0afc1be6470beed3e19465c24da223e2.zip chromium_src-862a92ee0afc1be6470beed3e19465c24da223e2.tar.gz chromium_src-862a92ee0afc1be6470beed3e19465c24da223e2.tar.bz2 |
Make net::HostResolver refcounted.
This way it can be properly shared between the url request contexts, and the dns prefetcher, and dns observer.
BUG=http://crbug.com/14664
TEST=existing unit tests.
Review URL: http://codereview.chromium.org/149053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19425 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_layer_unittest.cc')
-rw-r--r-- | net/http/http_network_layer_unittest.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/http/http_network_layer_unittest.cc b/net/http/http_network_layer_unittest.cc index 32888f0..9fd35ea 100644 --- a/net/http/http_network_layer_unittest.cc +++ b/net/http/http_network_layer_unittest.cc @@ -14,17 +14,17 @@ class HttpNetworkLayerTest : public PlatformTest { }; TEST_F(HttpNetworkLayerTest, CreateAndDestroy) { - net::HostResolver host_resolver; scoped_ptr<net::ProxyService> proxy_service(net::ProxyService::CreateNull()); - net::HttpNetworkLayer factory(NULL, &host_resolver, proxy_service.get()); + net::HttpNetworkLayer factory( + NULL, new net::HostResolver, proxy_service.get()); scoped_ptr<net::HttpTransaction> trans(factory.CreateTransaction()); } TEST_F(HttpNetworkLayerTest, Suspend) { - net::HostResolver host_resolver; scoped_ptr<net::ProxyService> proxy_service(net::ProxyService::CreateNull()); - net::HttpNetworkLayer factory(NULL, &host_resolver, proxy_service.get()); + net::HttpNetworkLayer factory( + NULL, new net::HostResolver, proxy_service.get()); scoped_ptr<net::HttpTransaction> trans(factory.CreateTransaction()); trans.reset(); @@ -55,9 +55,8 @@ TEST_F(HttpNetworkLayerTest, GET) { net::StaticMockSocket data(data_reads, data_writes); mock_socket_factory.AddMockSocket(&data); - net::HostResolver host_resolver; scoped_ptr<net::ProxyService> proxy_service(net::ProxyService::CreateNull()); - net::HttpNetworkLayer factory(&mock_socket_factory, &host_resolver, + net::HttpNetworkLayer factory(&mock_socket_factory, new net::HostResolver, proxy_service.get()); TestCompletionCallback callback; |