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

Unified Diff: remoting/protocol/fake_session.cc

Issue 8831001: base::Bind: Convert Socket::Write. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix alignment. 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/fake_session.h ('k') | remoting/protocol/pepper_transport_socket_adapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_session.cc
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc
index f1a890a22bec774dfc058747cb0599db0354b00a..18071fd7584c92e379629b3f3fde09b08dc64302 100644
--- a/remoting/protocol/fake_session.cc
+++ b/remoting/protocol/fake_session.cc
@@ -86,6 +86,13 @@ int FakeSocket::Write(net::IOBuffer* buf, int buf_len,
buf->data(), buf->data() + buf_len);
return buf_len;
}
+int FakeSocket::Write(net::IOBuffer* buf, int buf_len,
+ const net::CompletionCallback& callback) {
+ EXPECT_EQ(message_loop_, MessageLoop::current());
+ written_data_.insert(written_data_.end(),
+ buf->data(), buf->data() + buf_len);
+ return buf_len;
+}
bool FakeSocket::SetReceiveBufferSize(int32 size) {
NOTIMPLEMENTED();
@@ -236,6 +243,13 @@ int FakeUdpSocket::Write(net::IOBuffer* buf, int buf_len,
written_packets_.back().assign(buf->data(), buf->data() + buf_len);
return buf_len;
}
+int FakeUdpSocket::Write(net::IOBuffer* buf, int buf_len,
+ const net::CompletionCallback& callback) {
+ EXPECT_EQ(message_loop_, MessageLoop::current());
+ written_packets_.push_back(std::string());
+ written_packets_.back().assign(buf->data(), buf->data() + buf_len);
+ return buf_len;
+}
bool FakeUdpSocket::SetReceiveBufferSize(int32 size) {
NOTIMPLEMENTED();
« no previous file with comments | « remoting/protocol/fake_session.h ('k') | remoting/protocol/pepper_transport_socket_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698