Chromium Code Reviews

Side by Side Diff: net/proxy/mock_proxy_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.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_PROXY_MOCK_PROXY_RESOLVER_H_ 5 #ifndef NET_PROXY_MOCK_PROXY_RESOLVER_H_
6 #define NET_PROXY_MOCK_PROXY_RESOLVER_H_ 6 #define NET_PROXY_MOCK_PROXY_RESOLVER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 28 matching lines...)
39 void CompleteNow(int rv) { 39 void CompleteNow(int rv) {
40 CompletionCallback* callback = callback_; 40 CompletionCallback* callback = callback_;
41 41
42 // May delete |this|. 42 // May delete |this|.
43 resolver_->RemovePendingRequest(this); 43 resolver_->RemovePendingRequest(this);
44 44
45 callback->Run(rv); 45 callback->Run(rv);
46 } 46 }
47 47
48 private: 48 private:
49 friend class base::RefCounted<Request>;
50
51 ~Request() {}
52
49 MockAsyncProxyResolverBase* resolver_; 53 MockAsyncProxyResolverBase* resolver_;
50 const GURL url_; 54 const GURL url_;
51 ProxyInfo* results_; 55 ProxyInfo* results_;
52 CompletionCallback* callback_; 56 CompletionCallback* callback_;
53 MessageLoop* origin_loop_; 57 MessageLoop* origin_loop_;
54 }; 58 };
55 59
56 class SetPacScriptRequest { 60 class SetPacScriptRequest {
57 public: 61 public:
58 SetPacScriptRequest(MockAsyncProxyResolverBase* resolver, 62 SetPacScriptRequest(MockAsyncProxyResolverBase* resolver,
(...skipping 103 matching lines...)
162 166
163 class MockAsyncProxyResolverExpectsBytes : public MockAsyncProxyResolverBase { 167 class MockAsyncProxyResolverExpectsBytes : public MockAsyncProxyResolverBase {
164 public: 168 public:
165 MockAsyncProxyResolverExpectsBytes() 169 MockAsyncProxyResolverExpectsBytes()
166 : MockAsyncProxyResolverBase(true /*expects_pac_bytes*/) {} 170 : MockAsyncProxyResolverBase(true /*expects_pac_bytes*/) {}
167 }; 171 };
168 172
169 } // namespace net 173 } // namespace net
170 174
171 #endif // NET_PROXY_MOCK_PROXY_RESOLVER_H_ 175 #endif // NET_PROXY_MOCK_PROXY_RESOLVER_H_
OLDNEW

Powered by Google App Engine