diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-27 01:50:14 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-27 01:50:14 +0000 |
commit | 94a0d3d91b7200e66a4d23bb49b38cae7e74f7db (patch) | |
tree | 7f6b01af9e6e2a741dc4938d8e524be9f277aa3a /net/ftp | |
parent | afef5e483bc3782ecaf2572493442e0a2bd22bac (diff) | |
download | chromium_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/ftp')
-rw-r--r-- | net/ftp/ftp_network_session.h | 2 | ||||
-rw-r--r-- | net/ftp/ftp_network_transaction_unittest.cc | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/net/ftp/ftp_network_session.h b/net/ftp/ftp_network_session.h index 29c34d2..dcaacad 100644 --- a/net/ftp/ftp_network_session.h +++ b/net/ftp/ftp_network_session.h @@ -22,7 +22,7 @@ class FtpNetworkSession : public base::RefCounted<FtpNetworkSession> { FtpAuthCache* auth_cache() { return &auth_cache_; } private: - HostResolver* host_resolver_; + scoped_refptr<HostResolver> host_resolver_; FtpAuthCache auth_cache_; }; diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc index b45156b..d381b0b 100644 --- a/net/ftp/ftp_network_transaction_unittest.cc +++ b/net/ftp/ftp_network_transaction_unittest.cc @@ -224,7 +224,7 @@ class FtpMockControlSocketFileDownloadRetrFail class FtpNetworkTransactionTest : public PlatformTest { public: FtpNetworkTransactionTest() - : session_(new FtpNetworkSession(&resolver_)), + : session_(new FtpNetworkSession(new HostResolver)), transaction_(session_.get(), &mock_socket_factory_) { } @@ -253,7 +253,6 @@ class FtpNetworkTransactionTest : public PlatformTest { EXPECT_EQ(FtpMockControlSocket::QUIT, ctrl_socket->state()); } - HostResolver resolver_; scoped_refptr<FtpNetworkSession> session_; MockClientSocketFactory mock_socket_factory_; FtpNetworkTransaction transaction_; |