diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 23:34:24 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 23:34:24 +0000 |
commit | 5389bc7ba5360633af04b9cf15497d56ce640ead (patch) | |
tree | 4518c05f3bad18a5b2f4739fc1a1c187651f9799 /net/base/host_resolver.h | |
parent | 4070a6b1efcb2dbea12508a0b912cfa3bc86f47e (diff) | |
download | chromium_src-5389bc7ba5360633af04b9cf15497d56ce640ead.zip chromium_src-5389bc7ba5360633af04b9cf15497d56ce640ead.tar.gz chromium_src-5389bc7ba5360633af04b9cf15497d56ce640ead.tar.bz2 |
Second patch in making destructors of refcounted objects private.
BUG=26749
Review URL: http://codereview.chromium.org/368001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/host_resolver.h')
-rw-r--r-- | net/base/host_resolver.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/base/host_resolver.h b/net/base/host_resolver.h index 9534e03..baaf2ac 100644 --- a/net/base/host_resolver.h +++ b/net/base/host_resolver.h @@ -104,11 +104,6 @@ class HostResolver : public base::RefCountedThreadSafe<HostResolver> { // Opaque type used to cancel a request. typedef void* RequestHandle; - // If any completion callbacks are pending when the resolver is destroyed, - // the host resolutions are cancelled, and the completion callbacks will not - // be called. - virtual ~HostResolver() {} - // Resolves the given hostname (or IP address literal), filling out the // |addresses| object upon success. The |info.port| parameter will be set as // the sin(6)_port field of the sockaddr_in{6} struct. Returns OK if @@ -157,8 +152,15 @@ class HostResolver : public base::RefCountedThreadSafe<HostResolver> { virtual void SetDefaultAddressFamily(AddressFamily address_family) {} protected: + friend class base::RefCountedThreadSafe<HostResolver>; + HostResolver() { } + // If any completion callbacks are pending when the resolver is destroyed, + // the host resolutions are cancelled, and the completion callbacks will not + // be called. + virtual ~HostResolver() {} + private: DISALLOW_COPY_AND_ASSIGN(HostResolver); }; |