• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2023 The Chromium Authors
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_RESOLUTION_PROXY_SERVER_UTIL_MAC_H_
6 #define NET_PROXY_RESOLUTION_PROXY_SERVER_UTIL_MAC_H_
7 
8 #include <CoreFoundation/CoreFoundation.h>
9 
10 #include "net/base/proxy_server.h"
11 
12 namespace net {
13 
14 // Utility function to pull out a host/port pair from a dictionary and return
15 // it as a ProxyServer object. Pass in a dictionary that has a  value for the
16 // host key and optionally a value for the port key. In the error condition
17 // where the host value is especially malformed, returns an invalid
18 // ProxyServer.
19 NET_EXPORT ProxyServer ProxyDictionaryToProxyServer(ProxyServer::Scheme scheme,
20                                                     CFDictionaryRef dict,
21                                                     CFStringRef host_key,
22                                                     CFStringRef port_key);
23 
24 }  // namespace net
25 
26 #endif  // NET_PROXY_RESOLUTION_PROXY_SERVER_UTIL_MAC_H_
27