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

Unified Diff: remoting/protocol/channel_multiplexer.cc

Issue 841773005: Cleanup channel dispatchers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/channel_multiplexer.h ('k') | remoting/protocol/client_control_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/channel_multiplexer.cc
diff --git a/remoting/protocol/channel_multiplexer.cc b/remoting/protocol/channel_multiplexer.cc
index 62bb9d2902931d9b5e9b4baeb23699351e34146b..8d885fe28f05765d7c697f01138a0f86688f2e2f 100644
--- a/remoting/protocol/channel_multiplexer.cc
+++ b/remoting/protocol/channel_multiplexer.cc
@@ -348,6 +348,9 @@ ChannelMultiplexer::ChannelMultiplexer(StreamChannelFactory* factory,
: base_channel_factory_(factory),
base_channel_name_(base_channel_name),
next_channel_id_(0),
+ parser_(base::Bind(&ChannelMultiplexer::OnIncomingPacket,
+ base::Unretained(this)),
+ &reader_),
weak_factory_(this) {
}
@@ -400,9 +403,7 @@ void ChannelMultiplexer::OnBaseChannelReady(
if (base_channel_.get()) {
// Initialize reader and writer.
- reader_.Init(base_channel_.get(),
- base::Bind(&ChannelMultiplexer::OnIncomingPacket,
- base::Unretained(this)));
+ reader_.StartReading(base_channel_.get());
writer_.Init(base_channel_.get(),
base::Bind(&ChannelMultiplexer::OnWriteFailed,
base::Unretained(this)));
« no previous file with comments | « remoting/protocol/channel_multiplexer.h ('k') | remoting/protocol/client_control_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698