| 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| by updating our |
| 150 // list of bad proxies to include the first entry of |results|. Returns true |
| 151 // if there will be at least one proxy remaining in the list after fallback |
| 152 // and false otherwise. |
| 153 bool MarkProxyAsBad(const ProxyInfo& results, const BoundNetLog& net_log); |
| 154 |
| 149 // Called to report that the last proxy connection succeeded. If |proxy_info| | 155 // 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 | 156 // 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. | 157 // failed) for this request will be marked as bad. |
| 152 void ReportSuccess(const ProxyInfo& proxy_info); | 158 void ReportSuccess(const ProxyInfo& proxy_info); |
| 153 | 159 |
| 154 // Call this method with a non-null |pac_request| to cancel the PAC request. | 160 // Call this method with a non-null |pac_request| to cancel the PAC request. |
| 155 void CancelPacRequest(PacRequest* pac_request); | 161 void CancelPacRequest(PacRequest* pac_request); |
| 156 | 162 |
| 157 // Returns the LoadState for this |pac_request| which must be non-NULL. | 163 // Returns the LoadState for this |pac_request| which must be non-NULL. |
| 158 LoadState GetLoadState(const PacRequest* pac_request) const; | 164 LoadState GetLoadState(const PacRequest* pac_request) const; |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 | 432 |
| 427 base::WaitableEvent event_; | 433 base::WaitableEvent event_; |
| 428 CompletionCallback callback_; | 434 CompletionCallback callback_; |
| 429 ProxyInfo proxy_info_; | 435 ProxyInfo proxy_info_; |
| 430 int result_; | 436 int result_; |
| 431 }; | 437 }; |
| 432 | 438 |
| 433 } // namespace net | 439 } // namespace net |
| 434 | 440 |
| 435 #endif // NET_PROXY_PROXY_SERVICE_H_ | 441 #endif // NET_PROXY_PROXY_SERVICE_H_ |
| OLD | NEW |