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

Unified Diff: net/base/host_resolver.cc

Issue 525084: Cancel any outstanding host resolve when calling SOCKSClientSocket::Disconnec... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address wtc's comments Created 10 years, 11 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/base/host_resolver.h ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver.cc
===================================================================
--- net/base/host_resolver.cc (revision 35690)
+++ net/base/host_resolver.cc (working copy)
@@ -20,9 +20,7 @@
}
SingleRequestHostResolver::~SingleRequestHostResolver() {
- if (cur_request_) {
- resolver_->CancelRequest(cur_request_);
- }
+ Cancel();
}
int SingleRequestHostResolver::Resolve(const HostResolver::RequestInfo& info,
@@ -49,6 +47,13 @@
return rv;
}
+void SingleRequestHostResolver::Cancel() {
+ if (cur_request_) {
+ resolver_->CancelRequest(cur_request_);
+ cur_request_ = NULL;
+ }
+}
+
void SingleRequestHostResolver::OnResolveCompletion(int result) {
DCHECK(cur_request_ && cur_request_callback_);
« no previous file with comments | « net/base/host_resolver.h ('k') | net/socket/socks5_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698