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

Unified Diff: remoting/host/log_to_server.cc

Issue 9727005: Log connection type to syslogs and to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
Index: remoting/host/log_to_server.cc
diff --git a/remoting/host/log_to_server.cc b/remoting/host/log_to_server.cc
index f75764ade6c773917a0a70641f3c988928ff36ad..7282834c288da10fbf381e6e5eee5b0b2311210c 100644
--- a/remoting/host/log_to_server.cc
+++ b/remoting/host/log_to_server.cc
@@ -12,6 +12,7 @@
#include "remoting/jingle_glue/iq_sender.h"
#include "remoting/jingle_glue/jingle_thread.h"
#include "remoting/jingle_glue/signal_strategy.h"
+#include "remoting/protocol/transport.h"
#include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
#include "third_party/libjingle/source/talk/xmpp/constants.h"
@@ -50,6 +51,9 @@ void LogToServer::LogSessionStateChange(bool connected) {
connected));
entry->AddHostFields();
entry->AddModeField(mode_);
+
+ if (connected)
+ entry->AddConnectionTypeField(current_connection_type_);
Log(*entry.get());
}
@@ -77,6 +81,16 @@ void LogToServer::OnClientDisconnected(const std::string& jid) {
void LogToServer::OnAccessDenied(const std::string& jid) {
}
+void LogToServer::OnClientRouteChange(const std::string& jid,
+ const std::string& channel_name,
+ const protocol::TransportRoute& route) {
+ // Store connection type for the video channel. It is logged later
+ // when client authentication is finished.
+ if (channel_name == kVideoChannelName) {
+ current_connection_type_ = route.GetTypeString();
+ }
+}
+
void LogToServer::OnShutdown() {
}

Powered by Google App Engine
This is Rietveld 408576698