Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Side by Side Diff: net/proxy/proxy_resolver.h

Issue 8985012: base::Bind: Convert net/proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add bind includes. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_H_ 5 #ifndef NET_PROXY_PROXY_RESOLVER_H_
6 #define NET_PROXY_PROXY_RESOLVER_H_ 6 #define NET_PROXY_PROXY_RESOLVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 25 matching lines...) Expand all
36 virtual ~ProxyResolver() {} 36 virtual ~ProxyResolver() {}
37 37
38 // Gets a list of proxy servers to use for |url|. If the request will 38 // Gets a list of proxy servers to use for |url|. If the request will
39 // complete asynchronously returns ERR_IO_PENDING and notifies the result 39 // complete asynchronously returns ERR_IO_PENDING and notifies the result
40 // by running |callback|. If the result code is OK then 40 // by running |callback|. If the result code is OK then
41 // the request was successful and |results| contains the proxy 41 // the request was successful and |results| contains the proxy
42 // resolution information. In the case of asynchronous completion 42 // resolution information. In the case of asynchronous completion
43 // |*request| is written to, and can be passed to CancelRequest(). 43 // |*request| is written to, and can be passed to CancelRequest().
44 virtual int GetProxyForURL(const GURL& url, 44 virtual int GetProxyForURL(const GURL& url,
45 ProxyInfo* results, 45 ProxyInfo* results,
46 OldCompletionCallback* callback, 46 const net::CompletionCallback& callback,
47 RequestHandle* request, 47 RequestHandle* request,
48 const BoundNetLog& net_log) = 0; 48 const BoundNetLog& net_log) = 0;
49 49
50 // Cancels |request|. 50 // Cancels |request|.
51 virtual void CancelRequest(RequestHandle request) = 0; 51 virtual void CancelRequest(RequestHandle request) = 0;
52 52
53 // Gets the LoadState for |request|. 53 // Gets the LoadState for |request|.
54 virtual LoadState GetLoadState(RequestHandle request) const = 0; 54 virtual LoadState GetLoadState(RequestHandle request) const = 0;
55 55
56 // Gets the LoadState for |request|. May be called from another thread. 56 // Gets the LoadState for |request|. May be called from another thread.
(...skipping 10 matching lines...) Expand all
67 // Frees any unneeded memory held by the resolver, e.g. garbage in the JS 67 // Frees any unneeded memory held by the resolver, e.g. garbage in the JS
68 // engine. Most subclasses don't need to do anything, so we provide a default 68 // engine. Most subclasses don't need to do anything, so we provide a default
69 // no-op implementation. 69 // no-op implementation.
70 virtual void PurgeMemory() {} 70 virtual void PurgeMemory() {}
71 71
72 // Called to set the PAC script backend to use. 72 // Called to set the PAC script backend to use.
73 // Returns ERR_IO_PENDING in the case of asynchronous completion, and notifies 73 // Returns ERR_IO_PENDING in the case of asynchronous completion, and notifies
74 // the result through |callback|. 74 // the result through |callback|.
75 virtual int SetPacScript( 75 virtual int SetPacScript(
76 const scoped_refptr<ProxyResolverScriptData>& pac_script, 76 const scoped_refptr<ProxyResolverScriptData>& pac_script,
77 OldCompletionCallback* callback) = 0; 77 const net::CompletionCallback& callback) = 0;
78 78
79 // Optional shutdown code to be run before destruction. This is only used 79 // Optional shutdown code to be run before destruction. This is only used
80 // by the multithreaded runner to signal cleanup from origin thread 80 // by the multithreaded runner to signal cleanup from origin thread
81 virtual void Shutdown() {} 81 virtual void Shutdown() {}
82 82
83 private: 83 private:
84 const bool expects_pac_bytes_; 84 const bool expects_pac_bytes_;
85 85
86 DISALLOW_COPY_AND_ASSIGN(ProxyResolver); 86 DISALLOW_COPY_AND_ASSIGN(ProxyResolver);
87 }; 87 };
88 88
89 } // namespace net 89 } // namespace net
90 90
91 #endif // NET_PROXY_PROXY_RESOLVER_H_ 91 #endif // NET_PROXY_PROXY_RESOLVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698