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

Unified Diff: remoting/protocol/jingle_session.cc

Issue 8587053: Remove event_channel() and control_channel() from Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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/jingle_session.h ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/jingle_session.cc
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc
index e0b94508ee8255c35c554e1fc20cf8e01cbc13f5..8e22f543b34af37b4a1d37188dcec3ccafbf7cf6 100644
--- a/remoting/protocol/jingle_session.cc
+++ b/remoting/protocol/jingle_session.cc
@@ -88,8 +88,6 @@ void JingleSession::CloseInternal(int result, Error error) {
if (state_ != FAILED && state_ != CLOSED && !closing_) {
closing_ = true;
- control_channel_socket_.reset();
- event_channel_socket_.reset();
STLDeleteContainerPairSecondPointers(channel_connectors_.begin(),
channel_connectors_.end());
@@ -180,16 +178,6 @@ void JingleSession::CancelChannelCreation(const std::string& name) {
}
}
-net::Socket* JingleSession::control_channel() {
- DCHECK(CalledOnValidThread());
- return control_channel_socket_.get();
-}
-
-net::Socket* JingleSession::event_channel() {
- DCHECK(CalledOnValidThread());
- return event_channel_socket_.get();
-}
-
const std::string& JingleSession::jid() {
DCHECK(CalledOnValidThread());
return jid_;
@@ -388,8 +376,6 @@ void JingleSession::OnAccept() {
}
}
- CreateChannels();
-
SetState(CONNECTED);
}
@@ -443,33 +429,6 @@ void JingleSession::OnChannelConnectorFinished(
channel_connectors_.erase(name);
}
-void JingleSession::CreateChannels() {
- CreateStreamChannel(
- kControlChannelName,
- base::Bind(&JingleSession::OnChannelConnected,
- base::Unretained(this), &control_channel_socket_));
- CreateStreamChannel(
- kEventChannelName,
- base::Bind(&JingleSession::OnChannelConnected,
- base::Unretained(this), &event_channel_socket_));
-}
-
-void JingleSession::OnChannelConnected(
- scoped_ptr<net::Socket>* socket_container,
- net::StreamSocket* socket) {
- if (!socket) {
- LOG(ERROR) << "Failed to connect control or events channel. "
- << "Terminating connection";
- CloseInternal(net::ERR_CONNECTION_CLOSED, CHANNEL_CONNECTION_ERROR);
- return;
- }
-
- socket_container->reset(socket);
-
- if (control_channel_socket_.get() && event_channel_socket_.get())
- SetState(CONNECTED_CHANNELS);
-}
-
const cricket::ContentInfo* JingleSession::GetContentInfo() const {
const cricket::SessionDescription* session_description;
// If we initiate the session, we get to specify the content name. When
« no previous file with comments | « remoting/protocol/jingle_session.h ('k') | remoting/protocol/jingle_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698