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

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: 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') | remoting/webapp/client_screen.js » ('J')
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..90a55a48dac83a1d306c57694513aa3d1d98ff79 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,10 +935,15 @@ void HostProcess::OnAuthFailed() {
Shutdown(kInvalidOauthCredentialsExitCode);
}
-void HostProcess::RejectAuthenticatingClient() {
- DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
- DCHECK(host_);
- host_->RejectAuthenticatingClient();
Jamie 2012/11/28 23:52:32 There's a comment on this method saying that it sh
rmsousa 2012/11/29 00:11:14 Right now this is only called when activating the
Jamie 2012/11/29 01:05:58 which is
Sergey Ulanov 2012/11/30 01:09:39 +1. A message that says "maybe your entered incorr
+void HostProcess::OnCurtainModeFailed() {
+ LOG(ERROR) << "Curtain mode failed to activate. Closing connection.";
+ OnDisconnectRequested();
+}
+
+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
« no previous file with comments | « no previous file | remoting/webapp/client_screen.js » ('j') | remoting/webapp/client_screen.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698