| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_CONFIG_SERVICE_COMMON_UNITTEST_H_ | 5 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_COMMON_UNITTEST_H_ |
| 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_COMMON_UNITTEST_H_ | 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_COMMON_UNITTEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "net/proxy/proxy_config.h" | 11 #include "net/proxy/proxy_config.h" |
| 12 | 12 |
| 13 // A few small helper functions common to the win and linux unittests. | 13 // A few small helper functions common to the win and linux unittests. |
| 14 | 14 |
| 15 namespace net { | 15 namespace net { |
| 16 | 16 |
| 17 ProxyConfig::ProxyRules MakeProxyRules( | 17 ProxyConfig::ProxyRules MakeProxyRules( |
| 18 ProxyConfig::ProxyRules::Type type, | 18 ProxyConfig::ProxyRules::Type type, |
| 19 const char* single_proxy, | 19 const char* single_proxy, |
| 20 const char* proxy_for_http, | 20 const char* proxy_for_http, |
| 21 const char* proxy_for_https, | 21 const char* proxy_for_https, |
| 22 const char* proxy_for_ftp); | 22 const char* proxy_for_ftp, |
| 23 const char* socks_proxy); |
| 23 | 24 |
| 24 ProxyConfig::ProxyRules MakeSingleProxyRules(const char* single_proxy); | 25 ProxyConfig::ProxyRules MakeSingleProxyRules(const char* single_proxy); |
| 25 | 26 |
| 26 ProxyConfig::ProxyRules MakeProxyPerSchemeRules( | 27 ProxyConfig::ProxyRules MakeProxyPerSchemeRules( |
| 27 const char* proxy_http, | 28 const char* proxy_http, |
| 28 const char* proxy_https, | 29 const char* proxy_https, |
| 29 const char* proxy_ftp); | 30 const char* proxy_ftp); |
| 30 | 31 |
| 32 ProxyConfig::ProxyRules MakeProxyPerSchemeRules( |
| 33 const char* proxy_http, |
| 34 const char* proxy_https, |
| 35 const char* proxy_ftp, |
| 36 const char* socks_proxy); |
| 37 |
| 31 typedef std::vector<std::string> BypassList; | 38 typedef std::vector<std::string> BypassList; |
| 32 | 39 |
| 33 // Joins the proxy bypass list using "\n" to make it into a single string. | 40 // Joins the proxy bypass list using "\n" to make it into a single string. |
| 34 std::string FlattenProxyBypass(const BypassList& proxy_bypass); | 41 std::string FlattenProxyBypass(const BypassList& proxy_bypass); |
| 35 | 42 |
| 36 } // namespace net | 43 } // namespace net |
| 37 | 44 |
| 38 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_COMMON_UNITTEST_H_ | 45 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_COMMON_UNITTEST_H_ |
| OLD | NEW |