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

Unified Diff: net/dns/dns_transaction.cc

Issue 8824006: Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small win fix Created 9 years 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/dns/dns_transaction.cc
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
index a7fa922a885e68baddb2f856a2b9bca9498780c9..8d5a23aaeb503df942377c86415058c5c7f44c27 100644
--- a/net/dns/dns_transaction.cc
+++ b/net/dns/dns_transaction.cc
@@ -154,8 +154,6 @@ DnsTransaction::DnsTransaction(const IPEndPoint& dns_server,
next_state_(STATE_NONE),
socket_factory_(socket_factory ? socket_factory :
ClientSocketFactory::GetDefaultFactory()),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- io_callback_(this, &DnsTransaction::OnIOComplete)),
net_log_(BoundNetLog::Make(net_log, NetLog::SOURCE_DNS_TRANSACTION)) {
DCHECK(!rand_int.is_null());
for (size_t i = 0; i < arraysize(kTimeoutsMs); ++i)
@@ -272,7 +270,8 @@ int DnsTransaction::DoSendQuery() {
next_state_ = STATE_SEND_QUERY_COMPLETE;
return socket_->Write(query_->io_buffer(),
query_->io_buffer()->size(),
- &io_callback_);
+ base::Bind(&DnsTransaction::OnIOComplete,
+ base::Unretained(this)));
}
int DnsTransaction::DoSendQueryComplete(int rv) {
@@ -292,7 +291,8 @@ int DnsTransaction::DoReadResponse() {
response_.reset(new DnsResponse(query_.get()));
return socket_->Read(response_->io_buffer(),
response_->io_buffer()->size(),
- &io_callback_);
+ base::Bind(&DnsTransaction::OnIOComplete,
+ base::Unretained(this)));
}
int DnsTransaction::DoReadResponseComplete(int rv) {

Powered by Google App Engine
This is Rietveld 408576698