• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #ifndef NET_PROXY_PROXY_RESOLVER_MAC_H_
6 #define NET_PROXY_PROXY_RESOLVER_MAC_H_
7 #pragma once
8 
9 #include "googleurl/src/gurl.h"
10 #include "net/base/net_errors.h"
11 #include "net/proxy/proxy_resolver.h"
12 
13 namespace net {
14 
15 // Implementation of ProxyResolver that uses the Mac CFProxySupport to implement
16 // proxies.
17 class ProxyResolverMac : public ProxyResolver {
18  public:
19   ProxyResolverMac();
20   virtual ~ProxyResolverMac();
21 
22   // ProxyResolver methods:
23   virtual int GetProxyForURL(const GURL& url,
24                              ProxyInfo* results,
25                              CompletionCallback* callback,
26                              RequestHandle* request,
27                              const BoundNetLog& net_log);
28 
29   virtual void CancelRequest(RequestHandle request);
30 
31   virtual void CancelSetPacScript();
32 
33   virtual int SetPacScript(
34       const scoped_refptr<ProxyResolverScriptData>& script_data,
35       CompletionCallback* /*callback*/);
36 
37  private:
38   scoped_refptr<ProxyResolverScriptData> script_data_;
39 };
40 
41 }  // namespace net
42 
43 #endif  // NET_PROXY_PROXY_RESOLVER_MAC_H_
44