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

Unified Diff: chrome/browser/devtools/device/port_forwarding_controller.cc

Issue 2116983002: Change HostResolver::Resolve() to take an std::unique_ptr<Request>* rather than a RequestHandle* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: http_stream_factory_impl_job_controller_unittest RequestHandle* to unique_ptr Created 4 years, 5 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: chrome/browser/devtools/device/port_forwarding_controller.cc
diff --git a/chrome/browser/devtools/device/port_forwarding_controller.cc b/chrome/browser/devtools/device/port_forwarding_controller.cc
index 459e5c3fcbb3147890fdc2378aafffb78fb6b5de..e0adc9ce490f56f8a03ab0c61da72c566af50efe 100644
--- a/chrome/browser/devtools/device/port_forwarding_controller.cc
+++ b/chrome/browser/devtools/device/port_forwarding_controller.cc
@@ -67,12 +67,9 @@ class SocketTunnel : public base::NonThreadSafe {
host_resolver_ = net::HostResolver::CreateDefaultResolver(nullptr);
net::HostResolver::RequestInfo request_info(net::HostPortPair(host, port));
int result = host_resolver_->Resolve(
- request_info,
- net::DEFAULT_PRIORITY,
- &address_list_,
+ request_info, net::DEFAULT_PRIORITY, &address_list_,
base::Bind(&SocketTunnel::OnResolved, base::Unretained(this)),
- nullptr,
- net::BoundNetLog());
+ &request_, net::BoundNetLog());
if (result != net::ERR_IO_PENDING)
OnResolved(result);
}
@@ -186,6 +183,7 @@ class SocketTunnel : public base::NonThreadSafe {
std::unique_ptr<net::StreamSocket> remote_socket_;
std::unique_ptr<net::StreamSocket> host_socket_;
std::unique_ptr<net::HostResolver> host_resolver_;
+ std::unique_ptr<net::HostResolver::Request> request_;
net::AddressList address_list_;
int pending_writes_;
bool pending_destruction_;
« no previous file with comments | « no previous file | chrome/browser/devtools/device/tcp_device_provider.cc » ('j') | net/proxy/proxy_resolver_v8_tracing.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698