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

Unified Diff: remoting/protocol/connection_to_host.cc

Issue 7604021: Revert 96089 - Remove video_channel() from Session interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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/connection_to_host.h ('k') | remoting/protocol/fake_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_host.cc
===================================================================
--- remoting/protocol/connection_to_host.cc (revision 96105)
+++ remoting/protocol/connection_to_host.cc (working copy)
@@ -176,7 +176,8 @@
switch (state) {
case Session::FAILED:
state_ = STATE_FAILED;
- CloseOnError();
+ CloseChannels();
+ event_callback_->OnConnectionFailed(this);
break;
case Session::CLOSED:
@@ -189,10 +190,7 @@
state_ = STATE_CONNECTED;
// Initialize reader and writer.
video_reader_.reset(VideoReader::Create(session_->config()));
- video_reader_->Init(
- session_.get(), video_stub_,
- base::Bind(&ConnectionToHost::OnVideoChannelInitialized,
- base::Unretained(this)));
+ video_reader_->Init(session_.get(), video_stub_);
host_control_sender_.reset(
new HostControlSender(session_->control_channel()));
dispatcher_->Initialize(session_.get(), client_stub_);
@@ -205,27 +203,12 @@
}
}
-void ConnectionToHost::OnVideoChannelInitialized(bool successful) {
- if (!successful) {
- CloseOnError();
- return;
- }
-}
-
-void ConnectionToHost::CloseOnError() {
- state_ = STATE_FAILED;
- CloseChannels();
- event_callback_->OnConnectionFailed(this);
-}
-
void ConnectionToHost::CloseChannels() {
if (input_sender_.get())
input_sender_->Close();
if (host_control_sender_.get())
host_control_sender_->Close();
-
- video_reader_.reset();
}
void ConnectionToHost::OnClientAuthenticated() {
« no previous file with comments | « remoting/protocol/connection_to_host.h ('k') | remoting/protocol/fake_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698