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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 // bad will not be retried until |retry_delay| has passed. Returns true if | 161 // bad will not be retried until |retry_delay| has passed. Returns true if |
162 // there will be at least one proxy remaining in the list after fallback and | 162 // there will be at least one proxy remaining in the list after fallback and |
163 // false otherwise. | 163 // false otherwise. |
164 bool MarkProxiesAsBadUntil(const ProxyInfo& results, | 164 bool MarkProxiesAsBadUntil(const ProxyInfo& results, |
165 base::TimeDelta retry_delay, | 165 base::TimeDelta retry_delay, |
166 const ProxyServer& another_bad_proxy, | 166 const ProxyServer& another_bad_proxy, |
167 const BoundNetLog& net_log); | 167 const BoundNetLog& net_log); |
168 | 168 |
169 // Called to report that the last proxy connection succeeded. If |proxy_info| | 169 // Called to report that the last proxy connection succeeded. If |proxy_info| |
170 // has a non empty proxy_retry_info map, the proxies that have been tried (and | 170 // has a non empty proxy_retry_info map, the proxies that have been tried (and |
171 // failed) for this request will be marked as bad. | 171 // failed) for this request will be marked as bad. |network_delegate| will |
172 void ReportSuccess(const ProxyInfo& proxy_info); | 172 // be notified of any proxy fallbacks. |
| 173 void ReportSuccess(const ProxyInfo& proxy_info, |
| 174 NetworkDelegate* network_delegate); |
173 | 175 |
174 // Call this method with a non-null |pac_request| to cancel the PAC request. | 176 // Call this method with a non-null |pac_request| to cancel the PAC request. |
175 void CancelPacRequest(PacRequest* pac_request); | 177 void CancelPacRequest(PacRequest* pac_request); |
176 | 178 |
177 // Returns the LoadState for this |pac_request| which must be non-NULL. | 179 // Returns the LoadState for this |pac_request| which must be non-NULL. |
178 LoadState GetLoadState(const PacRequest* pac_request) const; | 180 LoadState GetLoadState(const PacRequest* pac_request) const; |
179 | 181 |
180 // Sets the ProxyScriptFetcher and DhcpProxyScriptFetcher dependencies. This | 182 // Sets the ProxyScriptFetcher and DhcpProxyScriptFetcher dependencies. This |
181 // is needed if the ProxyResolver is of type ProxyResolverWithoutFetch. | 183 // is needed if the ProxyResolver is of type ProxyResolverWithoutFetch. |
182 // ProxyService takes ownership of both objects. | 184 // ProxyService takes ownership of both objects. |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 | 426 |
425 // Whether child ProxyScriptDeciders should use QuickCheck | 427 // Whether child ProxyScriptDeciders should use QuickCheck |
426 bool quick_check_enabled_; | 428 bool quick_check_enabled_; |
427 | 429 |
428 DISALLOW_COPY_AND_ASSIGN(ProxyService); | 430 DISALLOW_COPY_AND_ASSIGN(ProxyService); |
429 }; | 431 }; |
430 | 432 |
431 } // namespace net | 433 } // namespace net |
432 | 434 |
433 #endif // NET_PROXY_PROXY_SERVICE_H_ | 435 #endif // NET_PROXY_PROXY_SERVICE_H_ |
OLD | NEW |