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

Issue 6271004: Changed MessageReader so that it doesn't read from the socket if there are (Closed)

Created:
9 years, 11 months ago by Sergey Ulanov
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Alpha Left Google, dmac, awong, garykac, Paweł Hajdan Jr., Sergey Ulanov
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=72262

Patch Set 1 #

Patch Set 2 : - #

Total comments: 2

Patch Set 3 : Removed compound messages. #

Patch Set 4 : proper handling of empty messages #

Total comments: 32

Patch Set 5 : addressed comments #

Patch Set 6 : More unittests #

Patch Set 7 : added todo #

Patch Set 8 : Removed lock #

Patch Set 9 : ref-counted MessageReader #

Unified diffs Side-by-side diffs Delta from patch set Stats (+430 lines, -152 lines) Patch
M remoting/base/compound_buffer.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M remoting/proto/event.proto View 1 2 3 4 1 chunk +0 lines, -14 lines 0 comments Download
M remoting/proto/internal.proto View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M remoting/protocol/client_message_dispatcher.h View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/client_message_dispatcher.cc View 1 2 3 4 5 6 2 chunks +7 lines, -8 lines 0 comments Download
M remoting/protocol/fake_session.h View 1 2 3 4 3 chunks +8 lines, -7 lines 0 comments Download
M remoting/protocol/fake_session.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M remoting/protocol/host_message_dispatcher.h View 1 2 3 4 2 chunks +3 lines, -5 lines 0 comments Download
M remoting/protocol/host_message_dispatcher.cc View 1 2 3 4 5 6 2 chunks +18 lines, -21 lines 0 comments Download
M remoting/protocol/input_sender.cc View 1 2 3 4 2 chunks +5 lines, -6 lines 0 comments Download
M remoting/protocol/message_decoder.h View 1 2 3 4 1 chunk +5 lines, -4 lines 0 comments Download
M remoting/protocol/message_decoder.cc View 1 2 chunks +4 lines, -3 lines 0 comments Download
M remoting/protocol/message_decoder_unittest.cc View 1 2 3 4 4 chunks +20 lines, -18 lines 0 comments Download
M remoting/protocol/message_reader.h View 1 2 3 4 5 6 7 8 4 chunks +50 lines, -8 lines 0 comments Download
M remoting/protocol/message_reader.cc View 1 2 3 4 5 6 7 8 4 chunks +50 lines, -7 lines 0 comments Download
A remoting/protocol/message_reader_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +242 lines, -0 lines 0 comments Download
M remoting/protocol/protobuf_video_reader.h View 1 chunk +1 line, -1 line 0 comments Download
M remoting/protocol/protobuf_video_reader.cc View 1 chunk +2 lines, -2 lines 0 comments Download
D remoting/protocol/ref_counted_message.h View 1 2 1 chunk +0 lines, -45 lines 0 comments Download
M remoting/remoting.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Sergey Ulanov
9 years, 11 months ago (2011-01-15 02:19:34 UTC) #1
awong
http://codereview.chromium.org/6271004/diff/3001/remoting/protocol/ref_counted_task.h File remoting/protocol/ref_counted_task.h (right): http://codereview.chromium.org/6271004/diff/3001/remoting/protocol/ref_counted_task.h#newcode23 remoting/protocol/ref_counted_task.h:23: class RefCountedTask : public base::RefCounted<RefCountedTask> { I'm not sure ...
9 years, 11 months ago (2011-01-19 02:12:48 UTC) #2
Sergey Ulanov
http://codereview.chromium.org/6271004/diff/3001/remoting/protocol/ref_counted_task.h File remoting/protocol/ref_counted_task.h (right): http://codereview.chromium.org/6271004/diff/3001/remoting/protocol/ref_counted_task.h#newcode23 remoting/protocol/ref_counted_task.h:23: class RefCountedTask : public base::RefCounted<RefCountedTask> { On 2011/01/19 02:12:48, ...
9 years, 11 months ago (2011-01-19 20:07:00 UTC) #3
Sergey Ulanov
I've removed compound messages and RefCountedTask class.
9 years, 11 months ago (2011-01-19 22:15:58 UTC) #4
awong
Thanks for cleaning that up. It does indeed look much simpler. http://codereview.chromium.org/6271004/diff/13001/remoting/proto/event.proto File remoting/proto/event.proto (right): ...
9 years, 11 months ago (2011-01-20 20:06:37 UTC) #5
Alpha Left Google
http://codereview.chromium.org/6271004/diff/13001/remoting/protocol/client_message_dispatcher.cc File remoting/protocol/client_message_dispatcher.cc (right): http://codereview.chromium.org/6271004/diff/13001/remoting/protocol/client_message_dispatcher.cc#newcode49 remoting/protocol/client_message_dispatcher.cc:49: LOG(ERROR) << "Invalid control message received."; On 2011/01/20 20:06:38, ...
9 years, 11 months ago (2011-01-20 20:54:51 UTC) #6
awong
http://codereview.chromium.org/6271004/diff/13001/remoting/protocol/client_message_dispatcher.cc File remoting/protocol/client_message_dispatcher.cc (right): http://codereview.chromium.org/6271004/diff/13001/remoting/protocol/client_message_dispatcher.cc#newcode49 remoting/protocol/client_message_dispatcher.cc:49: LOG(ERROR) << "Invalid control message received."; On 2011/01/20 20:54:52, ...
9 years, 11 months ago (2011-01-20 21:01:56 UTC) #7
Sergey Ulanov
http://codereview.chromium.org/6271004/diff/13001/remoting/proto/event.proto File remoting/proto/event.proto (right): http://codereview.chromium.org/6271004/diff/13001/remoting/proto/event.proto#newcode45 remoting/proto/event.proto:45: message EventMessage { On 2011/01/20 20:06:38, awong wrote: > ...
9 years, 11 months ago (2011-01-20 21:55:56 UTC) #8
awong
http://codereview.chromium.org/6271004/diff/13001/remoting/protocol/client_message_dispatcher.cc File remoting/protocol/client_message_dispatcher.cc (right): http://codereview.chromium.org/6271004/diff/13001/remoting/protocol/client_message_dispatcher.cc#newcode49 remoting/protocol/client_message_dispatcher.cc:49: LOG(ERROR) << "Invalid control message received."; On 2011/01/20 21:55:57, ...
9 years, 11 months ago (2011-01-20 22:08:02 UTC) #9
Sergey Ulanov
http://codereview.chromium.org/6271004/diff/13001/remoting/protocol/client_message_dispatcher.cc File remoting/protocol/client_message_dispatcher.cc (right): http://codereview.chromium.org/6271004/diff/13001/remoting/protocol/client_message_dispatcher.cc#newcode49 remoting/protocol/client_message_dispatcher.cc:49: LOG(ERROR) << "Invalid control message received."; On 2011/01/20 22:08:02, ...
9 years, 11 months ago (2011-01-21 03:45:04 UTC) #10
awong
http://codereview.chromium.org/6271004/diff/13001/remoting/protocol/message_reader.cc File remoting/protocol/message_reader.cc (right): http://codereview.chromium.org/6271004/diff/13001/remoting/protocol/message_reader.cc#newcode35 remoting/protocol/message_reader.cc:35: void OnDone(CompoundBuffer* buffer) { On 2011/01/21 03:45:05, sergeyu wrote: ...
9 years, 11 months ago (2011-01-21 19:19:33 UTC) #11
Alpha Left Google
9 years, 11 months ago (2011-01-21 23:30:21 UTC) #12
ok, looking much better. LGTM.

Powered by Google App Engine
This is Rietveld 408576698