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

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: Restore scoped_ptr to mock and nits 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
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 bbac2e72ccaa8dadedb54df1f3d33461d428c718..46b91a4ba876ac803d9e87a5a59c862f95657588 100644
--- a/net/proxy/mojo_proxy_resolver_impl.cc
+++ b/net/proxy/mojo_proxy_resolver_impl.cc
@@ -40,7 +40,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);
@@ -77,18 +77,14 @@ MojoProxyResolverImpl::Job::Job(
: resolver_(resolver),
client_(std::move(client)),
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(
« no previous file with comments | « net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc ('k') | net/proxy/mojo_proxy_resolver_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698