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

Unified Diff: remoting/protocol/channel_multiplexer.cc

Issue 550383002: Cleanup ChannelFactory interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/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 e8c195a3e7c24f8e0187e230ee2396e074725d74..a6a80b4a694ab97e3ab4b7bf75e029f5f37633a1 100644
--- a/remoting/protocol/channel_multiplexer.cc
+++ b/remoting/protocol/channel_multiplexer.cc
@@ -58,11 +58,11 @@ const char ChannelMultiplexer::kMuxChannelName[] = "mux";
struct ChannelMultiplexer::PendingChannel {
PendingChannel(const std::string& name,
- const StreamChannelCallback& callback)
+ const ChannelCreatedCallback& callback)
: name(name), callback(callback) {
}
std::string name;
- StreamChannelCallback callback;
+ ChannelCreatedCallback callback;
};
class ChannelMultiplexer::MuxChannel {
@@ -370,9 +370,8 @@ ChannelMultiplexer::~ChannelMultiplexer() {
base_channel_factory_->CancelChannelCreation(base_channel_name_);
}
-void ChannelMultiplexer::CreateStreamChannel(
- const std::string& name,
- const StreamChannelCallback& callback) {
+void ChannelMultiplexer::CreateChannel(const std::string& name,
+ const ChannelCreatedCallback& callback) {
if (base_channel_.get()) {
// Already have |base_channel_|. Create new multiplexed channel
// synchronously.
@@ -386,7 +385,7 @@ void ChannelMultiplexer::CreateStreamChannel(
// If this is the first multiplexed channel then create the base channel.
if (pending_channels_.size() == 1U) {
- base_channel_factory_->CreateStreamChannel(
+ base_channel_factory_->CreateChannel(
base_channel_name_,
base::Bind(&ChannelMultiplexer::OnBaseChannelReady,
base::Unretained(this)));
@@ -394,13 +393,6 @@ void ChannelMultiplexer::CreateStreamChannel(
}
}
-void ChannelMultiplexer::CreateDatagramChannel(
- const std::string& name,
- const DatagramChannelCallback& callback) {
- NOTIMPLEMENTED();
- callback.Run(scoped_ptr<net::Socket>());
-}
-
void ChannelMultiplexer::CancelChannelCreation(const std::string& name) {
for (std::list<PendingChannel>::iterator it = pending_channels_.begin();
it != pending_channels_.end(); ++it) {
« no previous file with comments | « remoting/protocol/channel_multiplexer.h ('k') | remoting/protocol/channel_multiplexer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698