Index: content/browser/renderer_host/p2p/socket_host_test_utils.h |
diff --git a/content/browser/renderer_host/p2p/socket_host_test_utils.h b/content/browser/renderer_host/p2p/socket_host_test_utils.h |
index 0f1aeb4ce86583f562e46c5f3f636c510fb3838c..79b47949321cc147ccd2918707d32a94e172e610 100644 |
--- a/content/browser/renderer_host/p2p/socket_host_test_utils.h |
+++ b/content/browser/renderer_host/p2p/socket_host_test_utils.h |
@@ -62,6 +62,8 @@ class FakeSocket : public net::StreamSocket { |
const net::CompletionCallback& callback) OVERRIDE; |
virtual int Write(net::IOBuffer* buf, int buf_len, |
net::OldCompletionCallback* callback) OVERRIDE; |
+ virtual int Write(net::IOBuffer* buf, int buf_len, |
+ const net::CompletionCallback& callback) OVERRIDE; |
virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE; |
@@ -179,6 +181,15 @@ int FakeSocket::Write(net::IOBuffer* buf, int buf_len, |
} |
return buf_len; |
} |
+int FakeSocket::Write(net::IOBuffer* buf, int buf_len, |
+ const net::CompletionCallback& callback) { |
+ DCHECK(buf); |
+ if (written_data_) { |
+ written_data_->insert(written_data_->end(), |
+ buf->data(), buf->data() + buf_len); |
+ } |
+ return buf_len; |
+} |
bool FakeSocket::SetReceiveBufferSize(int32 size) { |