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_CHAIN_UTIL_APPLE_H_ 6 #define NET_PROXY_RESOLUTION_PROXY_CHAIN_UTIL_APPLE_H_ 7 8 #include <CoreFoundation/CoreFoundation.h> 9 10 #include "net/base/proxy_chain.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 ProxyChain object. Pass in a dictionary that has a value for the 16 // host key, a proxy_type, and optionally a value for the port key. In the error 17 // condition where the host value is especially malformed, returns an invalid 18 // ProxyChain. 19 NET_EXPORT ProxyChain ProxyDictionaryToProxyChain(CFStringRef proxy_type, 20 CFDictionaryRef dict, 21 CFStringRef host_key, 22 CFStringRef port_key); 23 24 } // namespace net 25 26 #endif // NET_PROXY_RESOLUTION_PROXY_CHAIN_UTIL_APPLE_H_ 27