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

Unified Diff: remoting/protocol/channel_multiplexer.cc

Issue 10823323: Add support for multiplexed channels in remoting::protocol::Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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_dispatcher_base.cc ('k') | remoting/protocol/channel_multiplexer_unittest.cc » ('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 71647bfe890952c34f845a0e6ff4bd6ae1c164b3..3ad87bcf0d80ac60a4ee08a8eeb8f2552549f5e1 100644
--- a/remoting/protocol/channel_multiplexer.cc
+++ b/remoting/protocol/channel_multiplexer.cc
@@ -365,10 +365,6 @@ ChannelMultiplexer::ChannelMultiplexer(ChannelFactory* factory,
base_channel_name_(base_channel_name),
next_channel_id_(0),
destroyed_flag_(NULL) {
- factory->CreateStreamChannel(
- base_channel_name,
- base::Bind(&ChannelMultiplexer::OnBaseChannelReady,
- base::Unretained(this)));
}
ChannelMultiplexer::~ChannelMultiplexer() {
@@ -396,6 +392,14 @@ void ChannelMultiplexer::CreateStreamChannel(
} else {
// Still waiting for the |base_channel_|.
pending_channels_.push_back(PendingChannel(name, callback));
+
+ // If this is the first multiplexed channel then create the base channel.
+ if (pending_channels_.size() == 1U) {
+ base_channel_factory_->CreateStreamChannel(
+ base_channel_name_,
+ base::Bind(&ChannelMultiplexer::OnBaseChannelReady,
+ base::Unretained(this)));
+ }
}
}
« no previous file with comments | « remoting/protocol/channel_dispatcher_base.cc ('k') | remoting/protocol/channel_multiplexer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698