| Index: remoting/host/log_to_server.cc
|
| diff --git a/remoting/host/log_to_server.cc b/remoting/host/log_to_server.cc
|
| index 723b70994484605328dd2d78361909143811c6b9..9c0c50431314f617321f5d0d4972805d597124d4 100644
|
| --- a/remoting/host/log_to_server.cc
|
| +++ b/remoting/host/log_to_server.cc
|
| @@ -30,8 +30,7 @@ LogToServer::LogToServer(ChromotingHost* host,
|
| SignalStrategy* signal_strategy)
|
| : host_(host),
|
| mode_(mode),
|
| - signal_strategy_(signal_strategy),
|
| - connection_type_set_(false) {
|
| + signal_strategy_(signal_strategy) {
|
| signal_strategy_->AddListener(this);
|
|
|
| // |host| may be NULL in tests.
|
| @@ -45,7 +44,8 @@ LogToServer::~LogToServer() {
|
| host_->RemoveStatusObserver(this);
|
| }
|
|
|
| -void LogToServer::LogSessionStateChange(bool connected) {
|
| +void LogToServer::LogSessionStateChange(const std::string& jid,
|
| + bool connected) {
|
| DCHECK(CalledOnValidThread());
|
|
|
| scoped_ptr<ServerLogEntry> entry(
|
| @@ -54,8 +54,8 @@ void LogToServer::LogSessionStateChange(bool connected) {
|
| entry->AddModeField(mode_);
|
|
|
| if (connected) {
|
| - DCHECK(connection_type_set_);
|
| - entry->AddConnectionTypeField(connection_type_);
|
| + DCHECK(connection_route_type_.count(jid) == 1);
|
| + entry->AddConnectionTypeField(connection_route_type_[jid]);
|
| }
|
| Log(*entry.get());
|
| }
|
| @@ -73,13 +73,13 @@ void LogToServer::OnSignalStrategyStateChange(SignalStrategy::State state) {
|
|
|
| void LogToServer::OnClientAuthenticated(const std::string& jid) {
|
| DCHECK(CalledOnValidThread());
|
| - LogSessionStateChange(true);
|
| + LogSessionStateChange(jid, true);
|
| }
|
|
|
| void LogToServer::OnClientDisconnected(const std::string& jid) {
|
| DCHECK(CalledOnValidThread());
|
| - LogSessionStateChange(false);
|
| - connection_type_set_ = false;
|
| + LogSessionStateChange(jid, false);
|
| + connection_route_type_.erase(jid);
|
| }
|
|
|
| void LogToServer::OnAccessDenied(const std::string& jid) {
|
| @@ -91,8 +91,7 @@ void LogToServer::OnClientRouteChange(const std::string& jid,
|
| // Store connection type for the video channel. It is logged later
|
| // when client authentication is finished.
|
| if (channel_name == kVideoChannelName) {
|
| - connection_type_ = route.type;
|
| - connection_type_set_ = true;
|
| + connection_route_type_[jid] = route.type;
|
| }
|
| }
|
|
|
|
|