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_LIST_H_ | 5 #ifndef NET_PROXY_PROXY_LIST_H_ |
6 #define NET_PROXY_PROXY_LIST_H_ | 6 #define NET_PROXY_PROXY_LIST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // Returns a PAC-style semicolon-separated list of valid proxy servers. | 63 // Returns a PAC-style semicolon-separated list of valid proxy servers. |
64 // For example: "PROXY xxx.xxx.xxx.xxx:xx; SOCKS yyy.yyy.yyy:yy". | 64 // For example: "PROXY xxx.xxx.xxx.xxx:xx; SOCKS yyy.yyy.yyy:yy". |
65 std::string ToPacString() const; | 65 std::string ToPacString() const; |
66 | 66 |
67 // Marks the current proxy server as bad and deletes it from the list. The | 67 // Marks the current proxy server as bad and deletes it from the list. The |
68 // list of known bad proxies is given by proxy_retry_info. Returns true if | 68 // list of known bad proxies is given by proxy_retry_info. Returns true if |
69 // there is another server available in the list. | 69 // there is another server available in the list. |
70 bool Fallback(ProxyRetryInfoMap* proxy_retry_info, | 70 bool Fallback(ProxyRetryInfoMap* proxy_retry_info, |
71 const BoundNetLog& net_log); | 71 const BoundNetLog& net_log); |
72 | 72 |
| 73 // Updates |proxy_retry_info| to indicate that the first proxy in the list |
| 74 // is bad. This is distinct from Fallback(), above, to allow updating proxy |
| 75 // retry information without modifying a given transction's proxy list. |
| 76 void UpdateRetryInfoOnFallback(ProxyRetryInfoMap* proxy_retry_info, |
| 77 const BoundNetLog& net_log) const; |
| 78 |
73 private: | 79 private: |
74 // List of proxies. | 80 // List of proxies. |
75 std::vector<ProxyServer> proxies_; | 81 std::vector<ProxyServer> proxies_; |
76 }; | 82 }; |
77 | 83 |
78 } // namespace net | 84 } // namespace net |
79 | 85 |
80 #endif // NET_PROXY_PROXY_LIST_H_ | 86 #endif // NET_PROXY_PROXY_LIST_H_ |
OLD | NEW |