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_PROXY_SERVICE_H_ | 5 #ifndef NET_PROXY_PROXY_SERVICE_H_ |
6 #define NET_PROXY_PROXY_SERVICE_H_ | 6 #define NET_PROXY_PROXY_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // | 139 // |
140 // Returns ERR_FAILED if there is not another proxy config to try. | 140 // Returns ERR_FAILED if there is not another proxy config to try. |
141 // | 141 // |
142 // Profiling information for the request is saved to |net_log| if non-NULL. | 142 // Profiling information for the request is saved to |net_log| if non-NULL. |
143 int ReconsiderProxyAfterError(const GURL& url, | 143 int ReconsiderProxyAfterError(const GURL& url, |
144 ProxyInfo* results, | 144 ProxyInfo* results, |
145 const CompletionCallback& callback, | 145 const CompletionCallback& callback, |
146 PacRequest** pac_request, | 146 PacRequest** pac_request, |
147 const BoundNetLog& net_log); | 147 const BoundNetLog& net_log); |
148 | 148 |
| 149 // Explicitly trigger proxy fallback for the given |results|. Returns true |
| 150 // if there is at least one proxy remaining in the list after fallback and |
| 151 // false otherwise. |
| 152 bool Fallback(ProxyInfo* results, const BoundNetLog& net_log); |
| 153 |
149 // Called to report that the last proxy connection succeeded. If |proxy_info| | 154 // Called to report that the last proxy connection succeeded. If |proxy_info| |
150 // has a non empty proxy_retry_info map, the proxies that have been tried (and | 155 // has a non empty proxy_retry_info map, the proxies that have been tried (and |
151 // failed) for this request will be marked as bad. | 156 // failed) for this request will be marked as bad. |
152 void ReportSuccess(const ProxyInfo& proxy_info); | 157 void ReportSuccess(const ProxyInfo& proxy_info); |
153 | 158 |
154 // Call this method with a non-null |pac_request| to cancel the PAC request. | 159 // Call this method with a non-null |pac_request| to cancel the PAC request. |
155 void CancelPacRequest(PacRequest* pac_request); | 160 void CancelPacRequest(PacRequest* pac_request); |
156 | 161 |
157 // Returns the LoadState for this |pac_request| which must be non-NULL. | 162 // Returns the LoadState for this |pac_request| which must be non-NULL. |
158 LoadState GetLoadState(const PacRequest* pac_request) const; | 163 LoadState GetLoadState(const PacRequest* pac_request) const; |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 | 431 |
427 base::WaitableEvent event_; | 432 base::WaitableEvent event_; |
428 CompletionCallback callback_; | 433 CompletionCallback callback_; |
429 ProxyInfo proxy_info_; | 434 ProxyInfo proxy_info_; |
430 int result_; | 435 int result_; |
431 }; | 436 }; |
432 | 437 |
433 } // namespace net | 438 } // namespace net |
434 | 439 |
435 #endif // NET_PROXY_PROXY_SERVICE_H_ | 440 #endif // NET_PROXY_PROXY_SERVICE_H_ |
OLD | NEW |