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

Unified Diff: net/base/host_resolver_impl.cc

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_impl.cc
===================================================================
--- net/base/host_resolver_impl.cc (revision 31079)
+++ net/base/host_resolver_impl.cc (working copy)
@@ -149,11 +149,6 @@
error_(OK) {
}
- ~Job() {
- // Free the requests attached to this job.
- STLDeleteElements(&requests_);
- }
-
// Attaches a request to this job. The job takes ownership of |req| and will
// take care to delete it.
void AddRequest(Request* req) {
@@ -215,6 +210,13 @@
}
private:
+ friend class base::RefCountedThreadSafe<HostResolverImpl::Job>;
+
+ ~Job() {
+ // Free the requests attached to this job.
+ STLDeleteElements(&requests_);
+ }
+
void DoLookup() {
// Running on the worker thread
error_ = ResolveAddrInfo(resolver_proc_,

Powered by Google App Engine
This is Rietveld 408576698