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

Unified Diff: net/proxy/mojo_proxy_resolver_impl.cc

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/mojo_proxy_resolver_impl.cc
diff --git a/net/proxy/mojo_proxy_resolver_impl.cc b/net/proxy/mojo_proxy_resolver_impl.cc
index c5ae034040bc9a1c8e030b49c11d8f9a8d9a458c..7d142b8727706c53d2014bb4ef5c86afc9a0e6f3 100644
--- a/net/proxy/mojo_proxy_resolver_impl.cc
+++ b/net/proxy/mojo_proxy_resolver_impl.cc
@@ -37,7 +37,7 @@ class MojoProxyResolverImpl::Job {
interfaces::ProxyResolverRequestClientPtr client_;
ProxyInfo result_;
GURL url_;
- net::ProxyResolver::RequestHandle request_handle_;
+ scoped_ptr<net::ProxyResolver::Request> request_;
bool done_;
DISALLOW_COPY_AND_ASSIGN(Job);
@@ -75,18 +75,14 @@ MojoProxyResolverImpl::Job::Job(
: resolver_(resolver),
client_(client.Pass()),
url_(url),
- request_handle_(nullptr),
done_(false) {}
-MojoProxyResolverImpl::Job::~Job() {
- if (request_handle_ && !done_)
- resolver_->resolver_->CancelRequest(request_handle_);
-}
+MojoProxyResolverImpl::Job::~Job() {}
void MojoProxyResolverImpl::Job::Start() {
resolver_->resolver_->GetProxyForURL(
url_, &result_, base::Bind(&Job::GetProxyDone, base::Unretained(this)),
- &request_handle_,
+ &request_,
make_scoped_ptr(new MojoProxyResolverV8TracingBindings<
interfaces::ProxyResolverRequestClient>(client_.get())));
client_.set_connection_error_handler(base::Bind(

Powered by Google App Engine
This is Rietveld 408576698