Index: remoting/host/remoting_me2me_host.cc |
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc |
index 8cfdc5f85b07e57d787417a5967bfb31b5e50409..56ee994dcbeb4db4a3a6e33a22843039c3ba1c21 100644 |
--- a/remoting/host/remoting_me2me_host.cc |
+++ b/remoting/host/remoting_me2me_host.cc |
@@ -212,7 +212,9 @@ class HostProcess |
void OnAuthFailed(); |
- void RejectAuthenticatingClient(); |
+ void OnCurtainModeFailed(); |
+ |
+ void OnRemoteSessionSwitchedToConsole(); |
// Invoked when the user uses the Disconnect windows to terminate |
// the sessions, or when the local session is activated in curtain mode. |
@@ -312,9 +314,9 @@ HostProcess::HostProcess(scoped_ptr<ChromotingHostContext> context, |
// Create the platform-specific curtain-mode implementation. |
// TODO(wez): Create this on the network thread? |
curtain_ = CurtainMode::Create( |
- base::Bind(&HostProcess::OnDisconnectRequested, |
+ base::Bind(&HostProcess::OnRemoteSessionSwitchedToConsole, |
base::Unretained(this)), |
- base::Bind(&HostProcess::RejectAuthenticatingClient, |
+ base::Bind(&HostProcess::OnCurtainModeFailed, |
base::Unretained(this))); |
StartOnUiThread(); |
@@ -933,12 +935,19 @@ void HostProcess::OnAuthFailed() { |
Shutdown(kInvalidOauthCredentialsExitCode); |
} |
-void HostProcess::RejectAuthenticatingClient() { |
+void HostProcess::OnCurtainModeFailed() { |
DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); |
DCHECK(host_); |
+ LOG(ERROR) << "Curtain mode failed to activate. Closing connection."; |
host_->RejectAuthenticatingClient(); |
} |
+void HostProcess::OnRemoteSessionSwitchedToConsole() { |
+ LOG(INFO) << "The remote session switched was to the console." |
+ " Closing connection."; |
+ OnDisconnectRequested(); |
+} |
+ |
// Invoked when the user uses the Disconnect windows to terminate |
// the sessions, or when the local session is activated in curtain mode. |
void HostProcess::OnDisconnectRequested() { |