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

Unified Diff: net/socket/socks_client_socket.cc

Issue 2214693002: First step to remove SingleRequestHostResolver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: single Created 4 years, 4 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
« no previous file with comments | « net/socket/socks_client_socket.h ('k') | net/socket/transport_client_socket_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socks_client_socket.cc
diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc
index b5d5ce02e109df83df93775bd0c938aac81f3767..14bc0abb7ad6dbdff33012e2f35fe5475121696b 100644
--- a/net/socket/socks_client_socket.cc
+++ b/net/socket/socks_client_socket.cc
@@ -101,7 +101,7 @@ int SOCKSClientSocket::Connect(const CompletionCallback& callback) {
void SOCKSClientSocket::Disconnect() {
completed_handshake_ = false;
- host_resolver_.Cancel();
+ request_.reset();
transport_->socket()->Disconnect();
// Reset other states to make sure they aren't mistakenly used later.
@@ -289,12 +289,10 @@ int SOCKSClientSocket::DoResolveHost() {
// SOCKS4 only supports IPv4 addresses, so only try getting the IPv4
// addresses for the target host.
host_request_info_.set_address_family(ADDRESS_FAMILY_IPV4);
- return host_resolver_.Resolve(
- host_request_info_,
- priority_,
- &addresses_,
+ return host_resolver_->Resolve(
+ host_request_info_, priority_, &addresses_,
base::Bind(&SOCKSClientSocket::OnIOComplete, base::Unretained(this)),
- net_log_);
+ &request_, net_log_);
}
int SOCKSClientSocket::DoResolveHostComplete(int result) {
« no previous file with comments | « net/socket/socks_client_socket.h ('k') | net/socket/transport_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698