summaryrefslogtreecommitdiffstats
path: root/net/dns
diff options
context:
space:
mode:
authorajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 18:43:55 +0000
committerajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-09 18:43:55 +0000
commit83039bbf2f2ec0e918f7000b5212d104f60f2bb7 (patch)
treeb22dbd0051b57a437a588772a874271f0d02ffdb /net/dns
parente7456a206fe5b50aeb322ebabd6c26adc869a5fd (diff)
downloadchromium_src-83039bbf2f2ec0e918f7000b5212d104f60f2bb7.zip
chromium_src-83039bbf2f2ec0e918f7000b5212d104f60f2bb7.tar.gz
chromium_src-83039bbf2f2ec0e918f7000b5212d104f60f2bb7.tar.bz2
Migrate net/socket/socket.h, net/socket/stream_socket.h to base::Bind().
This changes Socket::Read(), Socket::Write, and StreamSocket::Connect() to use CompletionCallback and fixes all users. BUG=none TEST=existing. Review URL: http://codereview.chromium.org/8824006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/dns')
-rw-r--r--net/dns/dns_transaction.cc8
-rw-r--r--net/dns/dns_transaction.h1
2 files changed, 4 insertions, 5 deletions
diff --git a/net/dns/dns_transaction.cc b/net/dns/dns_transaction.cc
index 5cbe39a..6d711b4 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) {
diff --git a/net/dns/dns_transaction.h b/net/dns/dns_transaction.h
index d4078f0..e6a1d02 100644
--- a/net/dns/dns_transaction.h
+++ b/net/dns/dns_transaction.h
@@ -93,7 +93,6 @@ class NET_EXPORT_PRIVATE DnsTransaction :
State next_state_;
base::OneShotTimer<DnsTransaction> timer_;
- OldCompletionCallbackImpl<DnsTransaction> io_callback_;
BoundNetLog net_log_;