OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_PROXY_PROXY_RESOLVER_MAC_H_ | 5 #ifndef NET_PROXY_PROXY_RESOLVER_MAC_H_ |
6 #define NET_PROXY_PROXY_RESOLVER_MAC_H_ | 6 #define NET_PROXY_PROXY_RESOLVER_MAC_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "googleurl/src/gurl.h" | 9 #include "googleurl/src/gurl.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
11 #include "net/proxy/proxy_resolver.h" | 11 #include "net/proxy/proxy_resolver.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 // Implementation of ProxyResolver that uses the Mac CFProxySupport to implement | 15 // Implementation of ProxyResolver that uses the Mac CFProxySupport to implement |
16 // proxies. | 16 // proxies. |
17 class ProxyResolverMac : public ProxyResolver { | 17 class ProxyResolverMac : public ProxyResolver { |
18 public: | 18 public: |
19 ProxyResolverMac() : ProxyResolver(false /*expects_pac_bytes*/) {} | 19 ProxyResolverMac(); |
| 20 virtual ~ProxyResolverMac(); |
20 | 21 |
21 // ProxyResolver methods: | 22 // ProxyResolver methods: |
22 virtual int GetProxyForURL(const GURL& url, | 23 virtual int GetProxyForURL(const GURL& url, |
23 ProxyInfo* results, | 24 ProxyInfo* results, |
24 CompletionCallback* callback, | 25 CompletionCallback* callback, |
25 RequestHandle* request, | 26 RequestHandle* request, |
26 const BoundNetLog& net_log); | 27 const BoundNetLog& net_log); |
27 | 28 |
28 virtual void CancelRequest(RequestHandle request) { | 29 virtual void CancelRequest(RequestHandle request); |
29 NOTREACHED(); | 30 |
30 } | 31 virtual void CancelSetPacScript(); |
31 | 32 |
32 virtual int SetPacScript( | 33 virtual int SetPacScript( |
33 const scoped_refptr<ProxyResolverScriptData>& script_data, | 34 const scoped_refptr<ProxyResolverScriptData>& script_data, |
34 CompletionCallback* /*callback*/) { | 35 CompletionCallback* /*callback*/); |
35 script_data_ = script_data; | |
36 return OK; | |
37 } | |
38 | 36 |
39 private: | 37 private: |
40 scoped_refptr<ProxyResolverScriptData> script_data_; | 38 scoped_refptr<ProxyResolverScriptData> script_data_; |
41 }; | 39 }; |
42 | 40 |
43 } // namespace net | 41 } // namespace net |
44 | 42 |
45 #endif // NET_PROXY_PROXY_RESOLVER_MAC_H_ | 43 #endif // NET_PROXY_PROXY_RESOLVER_MAC_H_ |
OLD | NEW |