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

Unified Diff: remoting/protocol/fake_session.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/fake_session.h ('k') | remoting/protocol/jingle_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/fake_session.cc
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc
index dc64a1d52cfafcc2233cafdc300a2155ab6fda6b..4d547430679e6ea08aac341526305a0a142b910a 100644
--- a/remoting/protocol/fake_session.cc
+++ b/remoting/protocol/fake_session.cc
@@ -308,23 +308,6 @@ ErrorCode FakeSession::error() {
return error_;
}
-void FakeSession::CreateStreamChannel(
- const std::string& name, const StreamChannelCallback& callback) {
- scoped_ptr<FakeSocket> channel(new FakeSocket());
- stream_channels_[name] = channel.get();
- callback.Run(channel.PassAs<net::StreamSocket>());
-}
-
-void FakeSession::CreateDatagramChannel(
- const std::string& name, const DatagramChannelCallback& callback) {
- scoped_ptr<FakeUdpSocket> channel(new FakeUdpSocket());
- datagram_channels_[name] = channel.get();
- callback.Run(channel.PassAs<net::Socket>());
-}
-
-void FakeSession::CancelChannelCreation(const std::string& name) {
-}
-
const std::string& FakeSession::jid() {
return jid_;
}
@@ -341,9 +324,34 @@ void FakeSession::set_config(const SessionConfig& config) {
config_ = config;
}
+ChannelFactory* FakeSession::GetTransportChannelFactory() {
+ return this;
+}
+
+ChannelFactory* FakeSession::GetMultiplexedChannelFactory() {
+ return this;
+}
+
void FakeSession::Close() {
closed_ = true;
}
+void FakeSession::CreateStreamChannel(
+ const std::string& name, const StreamChannelCallback& callback) {
+ scoped_ptr<FakeSocket> channel(new FakeSocket());
+ stream_channels_[name] = channel.get();
+ callback.Run(channel.PassAs<net::StreamSocket>());
+}
+
+void FakeSession::CreateDatagramChannel(
+ const std::string& name, const DatagramChannelCallback& callback) {
+ scoped_ptr<FakeUdpSocket> channel(new FakeUdpSocket());
+ datagram_channels_[name] = channel.get();
+ callback.Run(channel.PassAs<net::Socket>());
+}
+
+void FakeSession::CancelChannelCreation(const std::string& name) {
+}
+
} // namespace protocol
} // namespace remoting
« no previous file with comments | « remoting/protocol/fake_session.h ('k') | remoting/protocol/jingle_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698