| Index: remoting/protocol/connection_to_client.cc
|
| diff --git a/remoting/protocol/connection_to_client.cc b/remoting/protocol/connection_to_client.cc
|
| index 4ec9a0b4aa5606a2be099d39fc24cf14a5666d20..023b9b3df8df42031804cec0616e9a759c4da32f 100644
|
| --- a/remoting/protocol/connection_to_client.cc
|
| +++ b/remoting/protocol/connection_to_client.cc
|
| @@ -22,13 +22,11 @@ namespace protocol {
|
| static const size_t kAverageUpdateStream = 10;
|
|
|
| ConnectionToClient::ConnectionToClient(MessageLoop* message_loop,
|
| - EventHandler* handler,
|
| - InputStub* input_stub)
|
| - : client_authenticated_(false),
|
| - loop_(message_loop),
|
| + EventHandler* handler)
|
| + : loop_(message_loop),
|
| handler_(handler),
|
| host_stub_(NULL),
|
| - input_stub_(input_stub) {
|
| + input_stub_(NULL) {
|
| DCHECK(loop_);
|
| DCHECK(handler_);
|
| }
|
| @@ -83,6 +81,10 @@ void ConnectionToClient::set_host_stub(protocol::HostStub* host_stub) {
|
| host_stub_ = host_stub;
|
| }
|
|
|
| +void ConnectionToClient::set_input_stub(protocol::InputStub* input_stub) {
|
| + input_stub_ = input_stub;
|
| +}
|
| +
|
| void ConnectionToClient::OnSessionStateChange(protocol::Session::State state) {
|
| if (state == protocol::Session::CONNECTED) {
|
| client_stub_.reset(new ClientControlSender(session_->control_channel()));
|
| @@ -128,32 +130,6 @@ void ConnectionToClient::StateChangeTask(protocol::Session::State state) {
|
|
|
| // OnClosed() is used as a callback for protocol::Session::Close().
|
| void ConnectionToClient::OnClosed() {
|
| - client_authenticated_ = false;
|
| -
|
| - // TODO(lambroslambrou): Remove these when stubs are refactored not to
|
| - // store authentication state.
|
| - if (input_stub_)
|
| - input_stub_->OnClosed();
|
| - if (host_stub_)
|
| - host_stub_->OnClosed();
|
| - if (client_stub_.get())
|
| - client_stub_->OnClosed();
|
| -}
|
| -
|
| -void ConnectionToClient::OnClientAuthenticated() {
|
| - client_authenticated_ = true;
|
| -
|
| - // Enable/disable each of the channels.
|
| - if (input_stub_)
|
| - input_stub_->OnAuthenticated();
|
| - if (host_stub_)
|
| - host_stub_->OnAuthenticated();
|
| - if (client_stub_.get())
|
| - client_stub_->OnAuthenticated();
|
| -}
|
| -
|
| -bool ConnectionToClient::client_authenticated() {
|
| - return client_authenticated_;
|
| }
|
|
|
| } // namespace protocol
|
|
|