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

Side by Side Diff: net/proxy/mock_proxy_resolver.h

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/proxy/init_proxy_resolver_unittest.cc ('k') | net/proxy/proxy_resolver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 MessageLoop* origin_loop_; 90 MessageLoop* origin_loop_;
91 }; 91 };
92 92
93 typedef std::vector<scoped_refptr<Request> > RequestsList; 93 typedef std::vector<scoped_refptr<Request> > RequestsList;
94 94
95 // ProxyResolver implementation: 95 // ProxyResolver implementation:
96 virtual int GetProxyForURL(const GURL& url, 96 virtual int GetProxyForURL(const GURL& url,
97 ProxyInfo* results, 97 ProxyInfo* results,
98 CompletionCallback* callback, 98 CompletionCallback* callback,
99 RequestHandle* request_handle, 99 RequestHandle* request_handle,
100 LoadLog* /*load_log*/) { 100 const BoundNetLog& /*net_log*/) {
101 scoped_refptr<Request> request = new Request(this, url, results, callback); 101 scoped_refptr<Request> request = new Request(this, url, results, callback);
102 pending_requests_.push_back(request); 102 pending_requests_.push_back(request);
103 103
104 if (request_handle) 104 if (request_handle)
105 *request_handle = reinterpret_cast<RequestHandle>(request.get()); 105 *request_handle = reinterpret_cast<RequestHandle>(request.get());
106 106
107 // Test code completes the request by calling request->CompleteNow(). 107 // Test code completes the request by calling request->CompleteNow().
108 return ERR_IO_PENDING; 108 return ERR_IO_PENDING;
109 } 109 }
110 110
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 class MockAsyncProxyResolverExpectsBytes : public MockAsyncProxyResolverBase { 171 class MockAsyncProxyResolverExpectsBytes : public MockAsyncProxyResolverBase {
172 public: 172 public:
173 MockAsyncProxyResolverExpectsBytes() 173 MockAsyncProxyResolverExpectsBytes()
174 : MockAsyncProxyResolverBase(true /*expects_pac_bytes*/) {} 174 : MockAsyncProxyResolverBase(true /*expects_pac_bytes*/) {}
175 }; 175 };
176 176
177 } // namespace net 177 } // namespace net
178 178
179 #endif // NET_PROXY_MOCK_PROXY_RESOLVER_H_ 179 #endif // NET_PROXY_MOCK_PROXY_RESOLVER_H_
OLDNEW
« no previous file with comments | « net/proxy/init_proxy_resolver_unittest.cc ('k') | net/proxy/proxy_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698