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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 11316231: Improve curtain mode error message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewer comments. Created 8 years, 1 month 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 | « no previous file | remoting/webapp/client_screen.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « no previous file | remoting/webapp/client_screen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698