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

Unified Diff: remoting/protocol/connection_to_client.cc

Issue 8774017: Add AUTHENTICATED session state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years 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/client/plugin/pepper_view.cc ('k') | remoting/protocol/connection_to_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/connection_to_client.cc
diff --git a/remoting/protocol/connection_to_client.cc b/remoting/protocol/connection_to_client.cc
index e247770d366cbec51c7fa168ce08499de7eddafe..de5b401ee5d96803e61cbbb0a2ed690faff18363 100644
--- a/remoting/protocol/connection_to_client.cc
+++ b/remoting/protocol/connection_to_client.cc
@@ -88,16 +88,18 @@ void ConnectionToClient::set_input_stub(protocol::InputStub* input_stub) {
input_stub_ = input_stub;
}
-void ConnectionToClient::OnSessionStateChange(protocol::Session::State state) {
+void ConnectionToClient::OnSessionStateChange(Session::State state) {
DCHECK(CalledOnValidThread());
DCHECK(handler_);
switch(state) {
- case protocol::Session::CONNECTING:
- // Don't care about this message.
+ case Session::INITIALIZING:
+ case Session::CONNECTING:
+ case Session::CONNECTED:
+ // Don't care about these events.
break;
- case protocol::Session::CONNECTED:
+ case Session::AUTHENTICATED:
// Initialize channels.
control_dispatcher_.reset(new HostControlDispatcher());
control_dispatcher_->Init(session_.get(), base::Bind(
@@ -118,18 +120,14 @@ void ConnectionToClient::OnSessionStateChange(protocol::Session::State state) {
break;
- case protocol::Session::CLOSED:
+ case Session::CLOSED:
CloseChannels();
handler_->OnConnectionClosed(this);
break;
- case protocol::Session::FAILED:
+ case Session::FAILED:
CloseOnError();
break;
-
- default:
- // We shouldn't receive other states.
- NOTREACHED();
}
}
« no previous file with comments | « remoting/client/plugin/pepper_view.cc ('k') | remoting/protocol/connection_to_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698