OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "net/base/net_api.h" | 12 #include "net/base/net_export.h" |
13 #include "net/proxy/proxy_retry_info.h" | 13 #include "net/proxy/proxy_retry_info.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 class ProxyServer; | 17 class ProxyServer; |
18 | 18 |
19 // This class is used to hold a list of proxies returned by GetProxyForUrl or | 19 // This class is used to hold a list of proxies returned by GetProxyForUrl or |
20 // manually configured. It handles proxy fallback if multiple servers are | 20 // manually configured. It handles proxy fallback if multiple servers are |
21 // specified. | 21 // specified. |
22 class NET_TEST ProxyList { | 22 class NET_EXPORT_PRIVATE ProxyList { |
23 public: | 23 public: |
24 ProxyList(); | 24 ProxyList(); |
25 ~ProxyList(); | 25 ~ProxyList(); |
26 | 26 |
27 // Initializes the proxy list to a string containing one or more proxy servers | 27 // Initializes the proxy list to a string containing one or more proxy servers |
28 // delimited by a semicolon. | 28 // delimited by a semicolon. |
29 void Set(const std::string& proxy_uri_list); | 29 void Set(const std::string& proxy_uri_list); |
30 | 30 |
31 // Set the proxy list to a single entry, |proxy_server|. | 31 // Set the proxy list to a single entry, |proxy_server|. |
32 void SetSingleProxyServer(const ProxyServer& proxy_server); | 32 void SetSingleProxyServer(const ProxyServer& proxy_server); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 bool Fallback(ProxyRetryInfoMap* proxy_retry_info); | 64 bool Fallback(ProxyRetryInfoMap* proxy_retry_info); |
65 | 65 |
66 private: | 66 private: |
67 // List of proxies. | 67 // List of proxies. |
68 std::vector<ProxyServer> proxies_; | 68 std::vector<ProxyServer> proxies_; |
69 }; | 69 }; |
70 | 70 |
71 } // namespace net | 71 } // namespace net |
72 | 72 |
73 #endif // NET_PROXY_PROXY_LIST_H_ | 73 #endif // NET_PROXY_PROXY_LIST_H_ |
OLD | NEW |