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

Unified Diff: remoting/protocol/fake_session.h

Issue 8801005: base::Bind: Convert Socket::Read. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. 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/jingle_glue/ssl_socket_adapter.cc ('k') | remoting/protocol/fake_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_session.h
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h
index 2faa554d5e6bba6feed463917f350bb3d3719d2c..a8239f571a6abe719d2cfad527b1311f64886181 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_;
« no previous file with comments | « remoting/jingle_glue/ssl_socket_adapter.cc ('k') | remoting/protocol/fake_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698