diff options
author | rmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 13:13:44 +0000 |
---|---|---|
committer | rmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-17 13:13:44 +0000 |
commit | 503a32aa106a335dab2b653f37e74486e54049ce (patch) | |
tree | 3ef934bb6078d98f3a0c159f83cc0c43bbeac083 | |
parent | bfe1922d47db61a4f1e0ba67af015c81443b8c0c (diff) | |
download | chromium_src-503a32aa106a335dab2b653f37e74486e54049ce.zip chromium_src-503a32aa106a335dab2b653f37e74486e54049ce.tar.gz chromium_src-503a32aa106a335dab2b653f37e74486e54049ce.tar.bz2 |
Use RejectAuthenticatingClient instead of DisconnectAllClients to reject incoming clients on curtain mode activation errors.
If we DisconnectAllClients from within the CurtainingHostObserver's OnClientAuthenticated callback, it will ultimately cause OnClientDisconnected callbacks for all HostStatusObservers to run *immediately*, before the OnClientAuthenticated for the next observer in the queue are called. This can cause the OnClientDisconnected callback for that observer to run *before* its OnClientAuthenticated callback.
For example, if HostUserInterface is enabled, a remote client tries to connect to the console, and curtaining fails, this will cause the local disconnect window to stay up after the client is rejected (before the Hide() call for the disconnection runs before Show()).
BUG=156254
Review URL: https://chromiumcodereview.appspot.com/11187017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162376 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | remoting/host/remoting_me2me_host.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc index 15960aa..733b85f 100644 --- a/remoting/host/remoting_me2me_host.cc +++ b/remoting/host/remoting_me2me_host.cc @@ -135,7 +135,7 @@ class HostProcess curtain_ = CurtainMode::Create( base::Bind(&HostProcess::OnDisconnectRequested, base::Unretained(this)), - base::Bind(&HostProcess::OnDisconnectRequested, + base::Bind(&HostProcess::RejectAuthenticatingClient, base::Unretained(this))); } @@ -598,6 +598,12 @@ class HostProcess Shutdown(kInvalidOauthCredentialsExitCode); } + void RejectAuthenticatingClient() { + DCHECK(context_->network_task_runner()->BelongsToCurrentThread()); + DCHECK(host_); + host_->RejectAuthenticatingClient(); + } + // Invoked when the user uses the Disconnect windows to terminate // the sessions, or when the local session is activated in curtain mode. void OnDisconnectRequested() { |