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

Unified Diff: remoting/host/chromoting_host.cc

Issue 10409021: Handle disconnection events properly for unauthenicated clients. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 months 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/host/client_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.cc
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
index a1285544f05a6d4bdfc8004108a684e10209688b..1c90477f02e9838d3dd9ec8afde087829ecf0c2d 100644
--- a/remoting/host/chromoting_host.cc
+++ b/remoting/host/chromoting_host.cc
@@ -254,15 +254,20 @@ void ChromotingHost::OnSessionClosed(ClientSession* client) {
recorder_->RemoveConnection(client->connection());
}
- FOR_EACH_OBSERVER(HostStatusObserver, status_observers_,
- OnClientDisconnected(client->client_jid()));
-
- if (recorder_.get()) {
- // Currently we don't allow more than one simultaneous connection,
- // so we need to shutdown recorder when a client disconnects.
- StopScreenRecorder();
+ if (client->is_authenticated()) {
+ FOR_EACH_OBSERVER(HostStatusObserver, status_observers_,
+ OnClientDisconnected(client->client_jid()));
+
+ // TODO(sergeyu): This teardown logic belongs to ClientSession
+ // class. It should start/stop screen recorder or tell the host
+ // when to do it.
+ if (recorder_.get()) {
+ // Currently we don't allow more than one simultaneous connection,
+ // so we need to shutdown recorder when a client disconnects.
+ StopScreenRecorder();
+ }
+ desktop_environment_->OnSessionFinished();
}
- desktop_environment_->OnSessionFinished();
}
void ChromotingHost::OnSessionSequenceNumber(ClientSession* session,
« no previous file with comments | « no previous file | remoting/host/client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698