OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 typedef std::vector<scoped_refptr<Request> > RequestsList; | 47 typedef std::vector<scoped_refptr<Request> > RequestsList; |
48 | 48 |
49 MockAsyncProxyResolver(); | 49 MockAsyncProxyResolver(); |
50 ~MockAsyncProxyResolver() override; | 50 ~MockAsyncProxyResolver() override; |
51 | 51 |
52 // ProxyResolver implementation. | 52 // ProxyResolver implementation. |
53 int GetProxyForURL(const GURL& url, | 53 int GetProxyForURL(const GURL& url, |
54 ProxyInfo* results, | 54 ProxyInfo* results, |
55 const CompletionCallback& callback, | 55 const CompletionCallback& callback, |
56 RequestHandle* request_handle, | 56 RequestHandle* request_handle, |
57 const BoundNetLog& /*net_log*/) override; | 57 const NetLogWithSource& /*net_log*/) override; |
58 void CancelRequest(RequestHandle request_handle) override; | 58 void CancelRequest(RequestHandle request_handle) override; |
59 LoadState GetLoadState(RequestHandle request_handle) const override; | 59 LoadState GetLoadState(RequestHandle request_handle) const override; |
60 const RequestsList& pending_requests() const { | 60 const RequestsList& pending_requests() const { |
61 return pending_requests_; | 61 return pending_requests_; |
62 } | 62 } |
63 | 63 |
64 const RequestsList& cancelled_requests() const { | 64 const RequestsList& cancelled_requests() const { |
65 return cancelled_requests_; | 65 return cancelled_requests_; |
66 } | 66 } |
67 | 67 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // so long as this remains in use. | 140 // so long as this remains in use. |
141 class ForwardingProxyResolver : public ProxyResolver { | 141 class ForwardingProxyResolver : public ProxyResolver { |
142 public: | 142 public: |
143 explicit ForwardingProxyResolver(ProxyResolver* impl); | 143 explicit ForwardingProxyResolver(ProxyResolver* impl); |
144 | 144 |
145 // ProxyResolver overrides. | 145 // ProxyResolver overrides. |
146 int GetProxyForURL(const GURL& query_url, | 146 int GetProxyForURL(const GURL& query_url, |
147 ProxyInfo* results, | 147 ProxyInfo* results, |
148 const CompletionCallback& callback, | 148 const CompletionCallback& callback, |
149 RequestHandle* request, | 149 RequestHandle* request, |
150 const BoundNetLog& net_log) override; | 150 const NetLogWithSource& net_log) override; |
151 void CancelRequest(RequestHandle request) override; | 151 void CancelRequest(RequestHandle request) override; |
152 LoadState GetLoadState(RequestHandle request) const override; | 152 LoadState GetLoadState(RequestHandle request) const override; |
153 | 153 |
154 private: | 154 private: |
155 ProxyResolver* impl_; | 155 ProxyResolver* impl_; |
156 | 156 |
157 DISALLOW_COPY_AND_ASSIGN(ForwardingProxyResolver); | 157 DISALLOW_COPY_AND_ASSIGN(ForwardingProxyResolver); |
158 }; | 158 }; |
159 | 159 |
160 } // namespace net | 160 } // namespace net |
161 | 161 |
162 #endif // NET_PROXY_MOCK_PROXY_RESOLVER_H_ | 162 #endif // NET_PROXY_MOCK_PROXY_RESOLVER_H_ |
OLD | NEW |