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

Unified Diff: remoting/protocol/message_decoder_unittest.cc

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: - 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
Index: remoting/protocol/message_decoder_unittest.cc
diff --git a/remoting/protocol/message_decoder_unittest.cc b/remoting/protocol/message_decoder_unittest.cc
index 81bb6992a42c741c274c066eee04b4b228b1cf4f..c4217cbe89d3345924eb83d5d42568ce6164bcb5 100644
--- a/remoting/protocol/message_decoder_unittest.cc
+++ b/remoting/protocol/message_decoder_unittest.cc
@@ -71,12 +71,12 @@ void SimulateReadSequence(const int read_sequence[], int sequence_size) {
memcpy(buffer->data(), test_data + i, read);
decoder.AddData(buffer, read);
while (true) {
- CompoundBuffer message;
- if (!decoder.GetNextMessage(&message))
+ scoped_ptr<CompoundBuffer> message(decoder.GetNextMessage());
+ if (!message.get())
break;
EventMessage* event = new EventMessage();
- CompoundBufferInputStream stream(&message);
+ CompoundBufferInputStream stream(message.get());
ASSERT_TRUE(event->ParseFromZeroCopyStream(&stream));
message_list.push_back(event);
}

Powered by Google App Engine
This is Rietveld 408576698