diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-07 02:03:33 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-07 02:03:33 +0000 |
commit | 3f55aa10587b3eaa629d7e95de87998b399fe3e2 (patch) | |
tree | 0f407a7e7fc837bed337a9a5af787edbd9473ef6 /remoting/protocol/fake_session.h | |
parent | b456003a580041d83e7f5a998c15f62ce380560f (diff) | |
download | chromium_src-3f55aa10587b3eaa629d7e95de87998b399fe3e2.zip chromium_src-3f55aa10587b3eaa629d7e95de87998b399fe3e2.tar.gz chromium_src-3f55aa10587b3eaa629d7e95de87998b399fe3e2.tar.bz2 |
base::Bind: Convert Socket::Read.
BUG=none
TEST=none
R=csilv
Review URL: http://codereview.chromium.org/8801005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113326 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/fake_session.h')
-rw-r--r-- | remoting/protocol/fake_session.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h index 2faa554..a8239f5 100644 --- a/remoting/protocol/fake_session.h +++ b/remoting/protocol/fake_session.h @@ -10,6 +10,7 @@ #include <vector> #include "base/memory/scoped_ptr.h" +#include "net/base/completion_callback.h" #include "net/socket/socket.h" #include "net/socket/stream_socket.h" #include "remoting/protocol/session.h" @@ -40,6 +41,8 @@ class FakeSocket : public net::StreamSocket { // net::Socket implementation. 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; @@ -66,7 +69,8 @@ class FakeSocket : public net::StreamSocket { bool read_pending_; scoped_refptr<net::IOBuffer> read_buffer_; int read_buffer_size_; - net::OldCompletionCallback* read_callback_; + net::OldCompletionCallback* old_read_callback_; + net::CompletionCallback read_callback_; std::string written_data_; std::string input_data_; @@ -97,6 +101,8 @@ class FakeUdpSocket : public net::Socket { // net::Socket implementation. 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; @@ -107,7 +113,8 @@ class FakeUdpSocket : public net::Socket { bool read_pending_; scoped_refptr<net::IOBuffer> read_buffer_; int read_buffer_size_; - net::OldCompletionCallback* read_callback_; + net::OldCompletionCallback* old_read_callback_; + net::CompletionCallback read_callback_; std::vector<std::string> written_packets_; std::vector<std::string> input_packets_; |