summaryrefslogtreecommitdiffstats
path: root/remoting/host/chromoting_host.cc
diff options
context:
space:
mode:
authoralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-01 19:30:22 +0000
committeralexeypa@chromium.org <alexeypa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-01 19:30:22 +0000
commit324b1965da906326fef564a36f227ecd4dbf5dc5 (patch)
tree8cfab5aeb8840e5443bc229799d5d821bb3b2010 /remoting/host/chromoting_host.cc
parent08e223d5ded887db69d3520572caf4baafe88cfd (diff)
downloadchromium_src-324b1965da906326fef564a36f227ecd4dbf5dc5.zip
chromium_src-324b1965da906326fef564a36f227ecd4dbf5dc5.tar.gz
chromium_src-324b1965da906326fef564a36f227ecd4dbf5dc5.tar.bz2
Create the desktop environment before any of the channel were connected.
ClientSession now creates the desktop environment and the corresponding video scheduler, event executor, etc. before any of the channel were created but after the connection has been authenticated and allowed by the host. This arrangement has two benefits: - Messages arriving before all channels are ready could be successfully processed instead of being ignored. - Desktop session can be created in parallel with channel creation reducing the overall connection time. This CL also splits initialization of the audio and video schedulers in two phases. The schedulers created and prepared to handle incoming messages once the connection has been authenticated. Then, ClientSession starts them (so they can start sending messages to the client) once all channels have been set up. BUG= Review URL: https://chromiumcodereview.appspot.com/14520018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/chromoting_host.cc')
-rw-r--r--remoting/host/chromoting_host.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index 0a365e1..9cd6abc 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -148,7 +148,7 @@ void ChromotingHost::SetMaximumSessionDuration(
////////////////////////////////////////////////////////////////////////////
// protocol::ClientSession::EventHandler implementation.
-void ChromotingHost::OnSessionAuthenticated(ClientSession* client) {
+bool ChromotingHost::OnSessionAuthenticated(ClientSession* client) {
DCHECK(CalledOnValidThread());
login_backoff_.Reset();
@@ -176,9 +176,7 @@ void ChromotingHost::OnSessionAuthenticated(ClientSession* client) {
OnClientAuthenticated(jid));
authenticating_client_ = false;
- if (reject_authenticating_client_) {
- client->DisconnectSession();
- }
+ return !reject_authenticating_client_;
}
void ChromotingHost::OnSessionChannelsConnected(ClientSession* client) {