[email protected] | c4c1b48 | 2011-07-22 17:24:26 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 153d44b | 2008-10-31 17:15:56 | [diff] [blame] | 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_RESOLVER_MAC_H_ | ||||
6 | #define NET_PROXY_PROXY_RESOLVER_MAC_H_ | ||||
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 7 | #pragma once |
[email protected] | 153d44b | 2008-10-31 17:15:56 | [diff] [blame] | 8 | |
[email protected] | c4c1b48 | 2011-07-22 17:24:26 | [diff] [blame] | 9 | #include "base/compiler_specific.h" |
[email protected] | 775fd9e | 2009-07-26 21:12:20 | [diff] [blame] | 10 | #include "googleurl/src/gurl.h" |
[email protected] | 172da1b | 2011-08-12 15:52:26 | [diff] [blame^] | 11 | #include "net/base/net_export.h" |
[email protected] | 620f571 | 2009-08-04 22:43:12 | [diff] [blame] | 12 | #include "net/base/net_errors.h" |
[email protected] | 7dc52f2 | 2009-03-02 22:37:18 | [diff] [blame] | 13 | #include "net/proxy/proxy_resolver.h" |
[email protected] | 153d44b | 2008-10-31 17:15:56 | [diff] [blame] | 14 | |
15 | namespace net { | ||||
16 | |||||
17 | // Implementation of ProxyResolver that uses the Mac CFProxySupport to implement | ||||
18 | // proxies. | ||||
[email protected] | 172da1b | 2011-08-12 15:52:26 | [diff] [blame^] | 19 | class NET_EXPORT ProxyResolverMac : public ProxyResolver { |
[email protected] | 153d44b | 2008-10-31 17:15:56 | [diff] [blame] | 20 | public: |
[email protected] | 1e60547 | 2010-12-16 21:41:40 | [diff] [blame] | 21 | ProxyResolverMac(); |
22 | virtual ~ProxyResolverMac(); | ||||
[email protected] | 45bdf86 | 2009-02-23 19:04:40 | [diff] [blame] | 23 | |
[email protected] | 153d44b | 2008-10-31 17:15:56 | [diff] [blame] | 24 | // ProxyResolver methods: |
[email protected] | 775fd9e | 2009-07-26 21:12:20 | [diff] [blame] | 25 | virtual int GetProxyForURL(const GURL& url, |
26 | ProxyInfo* results, | ||||
27 | CompletionCallback* callback, | ||||
[email protected] | 52ae80c | 2009-09-10 21:27:00 | [diff] [blame] | 28 | RequestHandle* request, |
[email protected] | c4c1b48 | 2011-07-22 17:24:26 | [diff] [blame] | 29 | const BoundNetLog& net_log) OVERRIDE; |
[email protected] | 775fd9e | 2009-07-26 21:12:20 | [diff] [blame] | 30 | |
[email protected] | c4c1b48 | 2011-07-22 17:24:26 | [diff] [blame] | 31 | virtual void CancelRequest(RequestHandle request) OVERRIDE; |
[email protected] | 1e60547 | 2010-12-16 21:41:40 | [diff] [blame] | 32 | |
[email protected] | c4c1b48 | 2011-07-22 17:24:26 | [diff] [blame] | 33 | virtual void CancelSetPacScript() OVERRIDE; |
[email protected] | 775fd9e | 2009-07-26 21:12:20 | [diff] [blame] | 34 | |
[email protected] | 2447640 | 2010-07-20 20:55:17 | [diff] [blame] | 35 | virtual int SetPacScript( |
36 | const scoped_refptr<ProxyResolverScriptData>& script_data, | ||||
[email protected] | c4c1b48 | 2011-07-22 17:24:26 | [diff] [blame] | 37 | CompletionCallback* /*callback*/) OVERRIDE; |
[email protected] | 775fd9e | 2009-07-26 21:12:20 | [diff] [blame] | 38 | |
[email protected] | 2447640 | 2010-07-20 20:55:17 | [diff] [blame] | 39 | private: |
40 | scoped_refptr<ProxyResolverScriptData> script_data_; | ||||
[email protected] | 153d44b | 2008-10-31 17:15:56 | [diff] [blame] | 41 | }; |
42 | |||||
[email protected] | 153d44b | 2008-10-31 17:15:56 | [diff] [blame] | 43 | } // namespace net |
44 | |||||
45 | #endif // NET_PROXY_PROXY_RESOLVER_MAC_H_ |