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

Unified Diff: remoting/protocol/fake_session.h

Issue 8743023: Separate Authenticator and Session unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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
Index: remoting/protocol/fake_session.h
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h
index 7eaab6becf0b8ea93ebdcb621a3691e32bf73c3e..7e77d5ffcc6a4b3ab4297c7b14626f2deb449b8a 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 "base/memory/weak_ptr.h"
#include "net/socket/socket.h"
#include "net/socket/stream_socket.h"
#include "remoting/protocol/session.h"
@@ -33,7 +34,8 @@ class FakeSocket : public net::StreamSocket {
const std::string& written_data() const { return written_data_; }
- void AppendInputData(const char* data, int data_size);
+ void AppendInputData(const std::vector<char>& data);
+ void Connect(FakeSocket* peer_socket);
Wez 2011/12/09 23:42:33 Isn't Connect() overloading net::StreamSocket::Con
Sergey Ulanov 2011/12/12 22:52:00 Renamed to SetPeer(), though I disagree that overl
Wez 2011/12/13 00:12:38 True, but the semantics of this Connect() method a
int input_pos() const { return input_pos_; }
bool read_pending() const { return read_pending_; }
@@ -66,6 +68,7 @@ class FakeSocket : public net::StreamSocket {
scoped_refptr<net::IOBuffer> read_buffer_;
int read_buffer_size_;
net::OldCompletionCallback* read_callback_;
+ base::WeakPtr<FakeSocket> peer_socket_;
std::string written_data_;
std::string input_data_;
@@ -74,6 +77,7 @@ class FakeSocket : public net::StreamSocket {
net::BoundNetLog net_log_;
MessageLoop* message_loop_;
+ base::WeakPtrFactory<FakeSocket> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(FakeSocket);
};

Powered by Google App Engine
This is Rietveld 408576698