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

Unified Diff: remoting/protocol/ice_connection_to_host.cc

Issue 1662673002: Add MessageChanneFactory interface and use it in ChannelDispatcherBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@framing
Patch Set: Created 4 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/ice_connection_to_host.h ('k') | remoting/protocol/ice_transport.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/ice_connection_to_host.cc
diff --git a/remoting/protocol/ice_connection_to_host.cc b/remoting/protocol/ice_connection_to_host.cc
index 28e5e620ee5b0b78a595dac9b65ff6fc6b2d8a1a..2f870267426fe29a8564719db2851b9c0a6a2ba9 100644
--- a/remoting/protocol/ice_connection_to_host.cc
+++ b/remoting/protocol/ice_connection_to_host.cc
@@ -120,7 +120,7 @@ void IceConnectionToHost::OnSessionStateChange(Session::State state) {
base::Unretained(this))));
video_dispatcher_.reset(
new ClientVideoDispatcher(monitored_video_stub_.get()));
- video_dispatcher_->Init(transport_->GetStreamChannelFactory(), this);
+ video_dispatcher_->Init(transport_->GetChannelFactory(), this);
// Configure audio pipeline if necessary.
if (session_->config().is_audio_enabled()) {
@@ -143,11 +143,11 @@ void IceConnectionToHost::OnSessionStateChange(Session::State state) {
// would be hard to add it because client plugin and webapp
// versions may not be in sync. It should be easy to do after we
// are finished moving the client plugin to NaCl.
+ CloseChannels();
if (state_ == CONNECTED && session_->error() == SIGNALING_TIMEOUT) {
- CloseChannels();
SetState(CLOSED, OK);
} else {
- CloseOnError(session_->error());
+ SetState(FAILED, session_->error());
}
break;
}
@@ -168,14 +168,6 @@ void IceConnectionToHost::OnChannelInitialized(
NotifyIfChannelsReady();
}
-void IceConnectionToHost::OnChannelError(
- ChannelDispatcherBase* channel_dispatcher,
- ErrorCode error) {
- LOG(ERROR) << "Failed to connect channel "
- << channel_dispatcher->channel_name();
- CloseOnError(CHANNEL_CONNECTION_ERROR);
-}
-
void IceConnectionToHost::OnVideoChannelStatus(bool active) {
event_callback_->OnConnectionReady(active);
}
@@ -204,11 +196,6 @@ void IceConnectionToHost::NotifyIfChannelsReady() {
SetState(CONNECTED, OK);
}
-void IceConnectionToHost::CloseOnError(ErrorCode error) {
- CloseChannels();
- SetState(FAILED, error);
-}
-
void IceConnectionToHost::CloseChannels() {
control_dispatcher_.reset();
event_dispatcher_.reset();
« no previous file with comments | « remoting/protocol/ice_connection_to_host.h ('k') | remoting/protocol/ice_transport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698