From 6852d7d96f3643277e8dab49e3bfa0e482aafffe Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Sat, 22 Jan 2011 02:34:56 +0000 Subject: 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 --- remoting/protocol/fake_session.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'remoting/protocol/fake_session.cc') 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); -- cgit v1.1