1 // Copyright 2011 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_RESOLVER_APPLE_H_ 6 #define NET_PROXY_RESOLUTION_PROXY_RESOLVER_APPLE_H_ 7 8 #include "base/compiler_specific.h" 9 #include "net/base/completion_once_callback.h" 10 #include "net/base/net_export.h" 11 #include "net/proxy_resolution/proxy_resolver_factory.h" 12 #include "url/gurl.h" 13 14 namespace net { 15 16 // Implementation of ProxyResolverFactory that uses the Apple CFProxySupport to 17 // implement proxies. 18 // TODO(kapishnikov): make ProxyResolverApple async as per 19 // https://bugs.chromium.org/p/chromium/issues/detail?id=166387#c95 20 class NET_EXPORT ProxyResolverFactoryApple : public ProxyResolverFactory { 21 public: 22 ProxyResolverFactoryApple(); 23 24 ProxyResolverFactoryApple(const ProxyResolverFactoryApple&) = delete; 25 ProxyResolverFactoryApple& operator=(const ProxyResolverFactoryApple&) = delete; 26 27 int CreateProxyResolver(const scoped_refptr<PacFileData>& pac_script, 28 std::unique_ptr<ProxyResolver>* resolver, 29 CompletionOnceCallback callback, 30 std::unique_ptr<Request>* request) override; 31 }; 32 33 } // namespace net 34 35 #endif // NET_PROXY_RESOLUTION_PROXY_RESOLVER_APPLE_H_ 36