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: net/socket/socket_test_util.h

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 | « net/socket/socket.h ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/socket_test_util.h
diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h
index 73ffc3d7c907ba24c39d55de3aa7e13849447bb4..1840bfc39c432e6d4d21021921c1b0ca5263a4f8 100644
--- a/net/socket/socket_test_util.h
+++ b/net/socket/socket_test_util.h
@@ -592,6 +592,8 @@ class MockClientSocket : public net::SSLClientSocket {
const net::CompletionCallback& callback) = 0;
virtual int Write(net::IOBuffer* buf, int buf_len,
net::OldCompletionCallback* callback) = 0;
+ virtual int Write(net::IOBuffer* buf, int buf_len,
+ const net::CompletionCallback& callback) = 0;
virtual bool SetReceiveBufferSize(int32 size) OVERRIDE;
virtual bool SetSendBufferSize(int32 size) OVERRIDE;
@@ -648,6 +650,8 @@ class MockTCPClientSocket : public MockClientSocket, public AsyncSocket {
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;
// StreamSocket implementation.
virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE;
@@ -703,12 +707,14 @@ class DeterministicMockTCPClientSocket : public MockClientSocket,
int CompleteRead();
// Socket implementation.
- virtual int Write(net::IOBuffer* buf, int buf_len,
- net::OldCompletionCallback* callback) OVERRIDE;
virtual int Read(net::IOBuffer* buf, int buf_len,
net::OldCompletionCallback* callback) OVERRIDE;
virtual int Read(net::IOBuffer* buf, int buf_len,
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;
// StreamSocket implementation.
virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE;
@@ -726,7 +732,8 @@ class DeterministicMockTCPClientSocket : public MockClientSocket,
private:
bool write_pending_;
- net::OldCompletionCallback* write_callback_;
+ net::OldCompletionCallback* old_write_callback_;
+ net::CompletionCallback write_callback_;
int write_result_;
net::MockRead read_data_;
@@ -757,6 +764,8 @@ class MockSSLClientSocket : public MockClientSocket, public AsyncSocket {
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;
// StreamSocket implementation.
virtual int Connect(net::OldCompletionCallback* callback) OVERRIDE;
@@ -804,6 +813,8 @@ class MockUDPClientSocket : public DatagramClientSocket,
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;
« no previous file with comments | « net/socket/socket.h ('k') | net/socket/socket_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698