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/proxy/single_threaded_proxy_resolver.cc | |
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/proxy/single_threaded_proxy_resolver.cc')
-rw-r--r-- | net/proxy/single_threaded_proxy_resolver.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/proxy/single_threaded_proxy_resolver.cc b/net/proxy/single_threaded_proxy_resolver.cc index ab13fa1..ad5fdba 100644 --- a/net/proxy/single_threaded_proxy_resolver.cc +++ b/net/proxy/single_threaded_proxy_resolver.cc @@ -18,6 +18,8 @@ class PurgeMemoryTask : public base::RefCountedThreadSafe<PurgeMemoryTask> { explicit PurgeMemoryTask(ProxyResolver* resolver) : resolver_(resolver) {} void PurgeMemory() { resolver_->PurgeMemory(); } private: + friend class base::RefCountedThreadSafe<PurgeMemoryTask>; + ~PurgeMemoryTask() {} ProxyResolver* resolver_; }; @@ -60,6 +62,11 @@ class SingleThreadedProxyResolver::SetPacScriptTask bool was_cancelled() const { return callback_ == NULL; } private: + friend class base::RefCountedThreadSafe< + SingleThreadedProxyResolver::SetPacScriptTask>; + + ~SetPacScriptTask() {} + // Runs on the worker thread. void DoRequest(ProxyResolver* resolver) { int rv = resolver->expects_pac_bytes() ? @@ -137,6 +144,10 @@ class SingleThreadedProxyResolver::Job bool was_cancelled() const { return callback_ == NULL; } private: + friend class base::RefCountedThreadSafe<SingleThreadedProxyResolver::Job>; + + ~Job() {} + // Runs on the worker thread. void DoQuery(ProxyResolver* resolver) { LoadLog* worker_log = new LoadLog; |