Chromium Code Reviews| 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..6c401d680de0a6c29661cc7a1459f3a6bcea30b9 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."; |
|
Sergey Ulanov
2012/11/30 01:09:39
nit: indentation. You can also remove "<<" here.
Jamie
2012/11/30 02:24:24
Done.
|
| + 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() { |