Index: net/proxy/proxy_resolver.h |
diff --git a/net/proxy/proxy_resolver.h b/net/proxy/proxy_resolver.h |
index 81efe0577ba53ecff048583e64821aff6f91a996..4061597793a96156aff31a6794cd6501a67e327e 100644 |
--- a/net/proxy/proxy_resolver.h |
+++ b/net/proxy/proxy_resolver.h |
@@ -27,8 +27,11 @@ class ProxyInfo; |
// requests at a time. |
class NET_EXPORT_PRIVATE ProxyResolver { |
public: |
- // Opaque pointer type, to return a handle to cancel outstanding requests. |
- typedef void* RequestHandle; |
+ class Request { |
+ public: |
+ virtual ~Request() {} // Cancels the request |
+ virtual LoadState GetLoadState() = 0; |
+ }; |
ProxyResolver() {} |
@@ -39,19 +42,14 @@ class NET_EXPORT_PRIVATE ProxyResolver { |
// 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, and can be passed to CancelRequest(). |
+ // |scoped_ptr<request>*| is written to and can be used for cancellation with |
eroman
2016/02/24 03:08:06
How about rephrasing this:
|*request| is written
|
+ // reset(). |
virtual int GetProxyForURL(const GURL& url, |
ProxyInfo* results, |
const CompletionCallback& callback, |
- RequestHandle* request, |
+ scoped_ptr<Request>* 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); |
}; |