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

Unified Diff: net/proxy/proxy_resolver.h

Issue 1745133002: Revert of Change ProxyResolver::GetProxyForURL() to take a scoped_ptr<Request>* rather than a RequestHandle* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/multi_threaded_proxy_resolver_unittest.cc ('k') | net/proxy/proxy_resolver_factory_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver.h
diff --git a/net/proxy/proxy_resolver.h b/net/proxy/proxy_resolver.h
index 0a85f6045d3ae12c348a31911d7e287c0e1188b8..81efe0577ba53ecff048583e64821aff6f91a996 100644
--- a/net/proxy/proxy_resolver.h
+++ b/net/proxy/proxy_resolver.h
@@ -27,11 +27,8 @@
// requests at a time.
class NET_EXPORT_PRIVATE ProxyResolver {
public:
- class Request {
- public:
- virtual ~Request() {} // Cancels the request
- virtual LoadState GetLoadState() = 0;
- };
+ // Opaque pointer type, to return a handle to cancel outstanding requests.
+ typedef void* RequestHandle;
ProxyResolver() {}
@@ -42,13 +39,18 @@
// by running |callback|. If the result code is OK then
// the request was successful and |results| contains the proxy
// resolution information. In the case of asynchronous completion
- // |*request| is written to. Call request->reset() to cancel. The
- // scoped_ptr<Request> must not outlive the ProxyResolver that assigned it.
+ // |*request| is written to, and can be passed to CancelRequest().
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
const CompletionCallback& callback,
- scoped_ptr<Request>* request,
+ RequestHandle* request,
const BoundNetLog& net_log) = 0;
+
+ // Cancels |request|.
+ virtual void CancelRequest(RequestHandle request) = 0;
+
+ // Gets the LoadState for |request|.
+ virtual LoadState GetLoadState(RequestHandle request) const = 0;
private:
DISALLOW_COPY_AND_ASSIGN(ProxyResolver);
« no previous file with comments | « net/proxy/multi_threaded_proxy_resolver_unittest.cc ('k') | net/proxy/proxy_resolver_factory_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698