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

Unified Diff: remoting/protocol/buffered_socket_writer.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/buffered_socket_writer.h ('k') | remoting/protocol/fake_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/buffered_socket_writer.cc
diff --git a/remoting/protocol/buffered_socket_writer.cc b/remoting/protocol/buffered_socket_writer.cc
index 2edba0b7184c06d436972d675bcef907679743a0..b05f467dc5862f8c7ed58715e6476fe6185ad7f5 100644
--- a/remoting/protocol/buffered_socket_writer.cc
+++ b/remoting/protocol/buffered_socket_writer.cc
@@ -42,8 +42,6 @@ BufferedSocketWriterBase::BufferedSocketWriterBase(
socket_(NULL),
message_loop_(message_loop),
write_pending_(false),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- written_callback_(this, &BufferedSocketWriterBase::OnWritten)),
closed_(false) {
}
@@ -93,8 +91,10 @@ void BufferedSocketWriterBase::DoWrite() {
if (!current_packet)
return;
- int result = socket_->Write(current_packet, current_packet_size,
- &written_callback_);
+ int result = socket_->Write(
+ current_packet, current_packet_size,
+ base::Bind(&BufferedSocketWriterBase::OnWritten,
+ base::Unretained(this)));
if (result >= 0) {
base::AutoLock auto_lock(lock_);
AdvanceBufferPosition_Locked(result);
« no previous file with comments | « remoting/protocol/buffered_socket_writer.h ('k') | remoting/protocol/fake_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698