summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_resolver.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/proxy/proxy_resolver.h')
-rw-r--r--net/proxy/proxy_resolver.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/net/proxy/proxy_resolver.h b/net/proxy/proxy_resolver.h
index 0a85f60..81efe05 100644
--- a/net/proxy/proxy_resolver.h
+++ b/net/proxy/proxy_resolver.h
@@ -27,11 +27,8 @@ class ProxyInfo;
// 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,14 +39,19 @@ 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. 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);
};