summaryrefslogtreecommitdiffstats
path: root/net/socket/tcp_client_socket_unittest.cc
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-27 01:50:14 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-27 01:50:14 +0000
commit94a0d3d91b7200e66a4d23bb49b38cae7e74f7db (patch)
tree7f6b01af9e6e2a741dc4938d8e524be9f277aa3a /net/socket/tcp_client_socket_unittest.cc
parentafef5e483bc3782ecaf2572493442e0a2bd22bac (diff)
downloadchromium_src-94a0d3d91b7200e66a4d23bb49b38cae7e74f7db.zip
chromium_src-94a0d3d91b7200e66a4d23bb49b38cae7e74f7db.tar.gz
chromium_src-94a0d3d91b7200e66a4d23bb49b38cae7e74f7db.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@19451 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/tcp_client_socket_unittest.cc')
-rw-r--r--net/socket/tcp_client_socket_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/socket/tcp_client_socket_unittest.cc b/net/socket/tcp_client_socket_unittest.cc
index 519d938..91b0e57 100644
--- a/net/socket/tcp_client_socket_unittest.cc
+++ b/net/socket/tcp_client_socket_unittest.cc
@@ -86,9 +86,9 @@ void TCPClientSocketTest::SetUp() {
listen_port_ = port;
AddressList addr;
- HostResolver resolver;
+ scoped_refptr<HostResolver> resolver(new HostResolver);
HostResolver::RequestInfo info("localhost", listen_port_);
- int rv = resolver.Resolve(info, &addr, NULL, NULL);
+ int rv = resolver->Resolve(info, &addr, NULL, NULL);
CHECK(rv == OK);
sock_.reset(new TCPClientSocket(addr));
}