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

Unified Diff: remoting/protocol/fake_session.h

Issue 6271004: Changed MessageReader so that it doesn't read from the socket if there are (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ref-counted MessageReader Created 9 years, 11 months 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/protocol/client_message_dispatcher.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 62818e40cdb8d79fab5c32a05a12fd280211c8a5..3ffe20be07680ec2454386ade38be0521f73578b 100644
--- a/remoting/protocol/fake_session.h
+++ b/remoting/protocol/fake_session.h
@@ -27,10 +27,11 @@ class FakeSocket : public net::Socket {
FakeSocket();
virtual ~FakeSocket();
- const std::string& written_data() { return written_data_; }
+ const std::string& written_data() const { return written_data_; }
- void AppendInputData(char* data, int data_size);
- int input_pos() { return input_pos_; }
+ void AppendInputData(const char* data, int data_size);
+ int input_pos() const { return input_pos_; }
+ bool read_pending() const { return read_pending_; }
// net::Socket interface.
virtual int Read(net::IOBuffer* buf, int buf_len,
@@ -60,12 +61,12 @@ class FakeUdpSocket : public net::Socket {
FakeUdpSocket();
virtual ~FakeUdpSocket();
- const std::vector<std::string>& written_packets() {
+ const std::vector<std::string>& written_packets() const {
return written_packets_;
}
- void AppendInputPacket(char* data, int data_size);
- int input_pos() { return input_pos_; }
+ void AppendInputPacket(const char* data, int data_size);
+ int input_pos() const { return input_pos_; }
// net::Socket interface.
virtual int Read(net::IOBuffer* buf, int buf_len,
@@ -100,7 +101,7 @@ class FakeSession : public Session {
message_loop_ = message_loop;
}
- bool is_closed() { return closed_; }
+ bool is_closed() const { return closed_; }
virtual void SetStateChangeCallback(StateChangeCallback* callback);
« no previous file with comments | « remoting/protocol/client_message_dispatcher.cc ('k') | remoting/protocol/fake_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698