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

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: rebased 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
« no previous file with comments | « net/dns/dns_transaction.h ('k') | net/ftp/ftp_network_transaction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_transaction.cc
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
index 5cbe39a26cf1a285c3f13f4bc9b35c617b78070f..6d711b4a5a97cbcd3fe4d3b88cf1192a962a3177 100644
--- a/net/dns/dns_transaction.cc
+++ b/net/dns/dns_transaction.cc
@@ -99,8 +99,6 @@ DnsTransaction::DnsTransaction(DnsSession* session,
callback_(callback),
attempts_(0),
next_state_(STATE_NONE),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- io_callback_(this, &DnsTransaction::OnIOComplete)),
net_log_(BoundNetLog::Make(session->net_log(),
NetLog::SOURCE_DNS_TRANSACTION)) {
net_log_.BeginEvent(
@@ -206,7 +204,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) {
@@ -226,7 +225,8 @@ int DnsTransaction::DoReadResponse() {
response_.reset(new DnsResponse());
return socket_->Read(response_->io_buffer(),
response_->io_buffer()->size(),
- &io_callback_);
+ base::Bind(&DnsTransaction::OnIOComplete,
+ base::Unretained(this)));
}
int DnsTransaction::DoReadResponseComplete(int rv) {
« no previous file with comments | « net/dns/dns_transaction.h ('k') | net/ftp/ftp_network_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698