Home | History | Annotate | Download | only in proxy
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef NET_PROXY_PROXY_CONFIG_SERVICE_COMMON_UNITTEST_H_
      6 #define NET_PROXY_PROXY_CONFIG_SERVICE_COMMON_UNITTEST_H_
      7 
      8 #include <string>
      9 #include <vector>
     10 
     11 #include "net/proxy/proxy_config.h"
     12 
     13 // A few small helper functions common to the win and linux unittests.
     14 
     15 namespace net {
     16 
     17 ProxyConfig::ProxyRules MakeProxyRules(
     18     ProxyConfig::ProxyRules::Type type,
     19     const char* single_proxy,
     20     const char* proxy_for_http,
     21     const char* proxy_for_https,
     22     const char* proxy_for_ftp,
     23     const char* socks_proxy);
     24 
     25 ProxyConfig::ProxyRules MakeSingleProxyRules(const char* single_proxy);
     26 
     27 ProxyConfig::ProxyRules MakeProxyPerSchemeRules(
     28     const char* proxy_http,
     29     const char* proxy_https,
     30     const char* proxy_ftp);
     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 
     38 typedef std::vector<std::string> BypassList;
     39 
     40 // Joins the proxy bypass list using "\n" to make it into a single string.
     41 std::string FlattenProxyBypass(const BypassList& proxy_bypass);
     42 
     43 }  // namespace net
     44 
     45 #endif  // NET_PROXY_PROXY_CONFIG_SERVICE_COMMON_UNITTEST_H_
     46