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

Unified Diff: net/proxy/proxy_resolver.h

Issue 1439053002: 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 5 years, 1 month 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
Index: net/proxy/proxy_resolver.h
diff --git a/net/proxy/proxy_resolver.h b/net/proxy/proxy_resolver.h
index b303e2b1491556e165683305265594757630d540..a625bd1dbac15a883593af3226385c95eddf2ace 100644
--- a/net/proxy/proxy_resolver.h
+++ b/net/proxy/proxy_resolver.h
@@ -26,8 +26,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() {}
@@ -42,15 +45,9 @@ class NET_EXPORT_PRIVATE ProxyResolver {
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);
};

Powered by Google App Engine
This is Rietveld 408576698