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

Unified Diff: remoting/protocol/socket_reader_base.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 | « remoting/protocol/socket_reader_base.h ('k') | remoting/protocol/v1_client_channel_authenticator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/socket_reader_base.cc
diff --git a/remoting/protocol/socket_reader_base.cc b/remoting/protocol/socket_reader_base.cc
index 743120df0bd35772b810b361e7dbb2a14fc05e75..f399927d423b95005b733af82436b6d0a790e4ee 100644
--- a/remoting/protocol/socket_reader_base.cc
+++ b/remoting/protocol/socket_reader_base.cc
@@ -17,9 +17,7 @@ int kReadBufferSize = 4096;
SocketReaderBase::SocketReaderBase()
: socket_(NULL),
- closed_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- read_callback_(this, &SocketReaderBase::OnRead)) {
+ closed_(false) {
}
SocketReaderBase::~SocketReaderBase() { }
@@ -34,7 +32,8 @@ void SocketReaderBase::DoRead() {
while (true) {
read_buffer_ = new net::IOBuffer(kReadBufferSize);
int result = socket_->Read(
- read_buffer_, kReadBufferSize, &read_callback_);
+ read_buffer_, kReadBufferSize, base::Bind(&SocketReaderBase::OnRead,
+ base::Unretained(this)));
HandleReadResult(result);
if (result < 0)
break;
« no previous file with comments | « remoting/protocol/socket_reader_base.h ('k') | remoting/protocol/v1_client_channel_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698