summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/fake_session.cc
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-22 02:34:56 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-22 02:34:56 +0000
commit6852d7d96f3643277e8dab49e3bfa0e482aafffe (patch)
tree65b97cf15fb3cb6a60b914abac6310c9ff22e710 /remoting/protocol/fake_session.cc
parenta4f4692c776153b2b61c0a63d8b9c80e56613881 (diff)
downloadchromium_src-6852d7d96f3643277e8dab49e3bfa0e482aafffe.zip
chromium_src-6852d7d96f3643277e8dab49e3bfa0e482aafffe.tar.gz
chromium_src-6852d7d96f3643277e8dab49e3bfa0e482aafffe.tar.bz2
Changed MessageReader so that it doesn't read from the socket if there are
other messages being processed. Added unittests for MessageReader. BUG=None TEST=Unittests Review URL: http://codereview.chromium.org/6271004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72262 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/fake_session.cc')
-rw-r--r--remoting/protocol/fake_session.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc
index ac344e0..fe50f2b 100644
--- a/remoting/protocol/fake_session.cc
+++ b/remoting/protocol/fake_session.cc
@@ -21,7 +21,7 @@ FakeSocket::FakeSocket()
FakeSocket::~FakeSocket() {
}
-void FakeSocket::AppendInputData(char* data, int data_size) {
+void FakeSocket::AppendInputData(const char* data, int data_size) {
input_data_.insert(input_data_.end(), data, data + data_size);
// Complete pending read if any.
if (read_pending_) {
@@ -78,7 +78,7 @@ FakeUdpSocket::FakeUdpSocket()
FakeUdpSocket::~FakeUdpSocket() {
}
-void FakeUdpSocket::AppendInputPacket(char* data, int data_size) {
+void FakeUdpSocket::AppendInputPacket(const char* data, int data_size) {
input_packets_.push_back(std::string());
input_packets_.back().assign(data, data + data_size);