Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: net/base/host_resolver.h

Issue 368001: Second patch in making destructors of refcounted objects private. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/host_resolver.h
===================================================================
--- net/base/host_resolver.h (revision 31079)
+++ net/base/host_resolver.h (working copy)
@@ -104,11 +104,6 @@
// 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 @@
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);
};

Powered by Google App Engine
This is Rietveld 408576698