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

Unified Diff: remoting/host/server_log_entry.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
« no previous file with comments | « remoting/host/server_log_entry.h ('k') | remoting/protocol/connection_to_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/server_log_entry.cc
diff --git a/remoting/host/server_log_entry.cc b/remoting/host/server_log_entry.cc
index 6e1a2672250ac3826926f3f9504edecc6afcb271..4ccc2794b073de4b80a01b03d3d6c4630e5b0c2b 100644
--- a/remoting/host/server_log_entry.cc
+++ b/remoting/host/server_log_entry.cc
@@ -42,6 +42,9 @@ const char kValueOsNameChromeOS[] = "ChromeOS";
const char kKeyOsVersion[] = "os-version";
const char kKeyCpu[] = "cpu";
+
+const char kKeyConnectionType[] = "connection-type";
+
} // namespace
ServerLogEntry::ServerLogEntry() {
@@ -80,16 +83,21 @@ void ServerLogEntry::AddHostFields() {
&os_bugfix_version);
os_version << os_major_version << "." << os_minor_version << "."
<< os_bugfix_version;
- Set(kKeyOsVersion, os_version.str().c_str());
+ Set(kKeyOsVersion, os_version.str());
#endif
- Set(kKeyCpu, SysInfo::CPUArchitecture().c_str());
+ Set(kKeyCpu, SysInfo::CPUArchitecture());
};
void ServerLogEntry::AddModeField(ServerLogEntry::Mode mode) {
Set(kKeyMode, GetValueMode(mode));
}
+void ServerLogEntry::AddConnectionTypeField(
+ protocol::TransportRoute::RouteType type) {
+ Set(kKeyConnectionType, protocol::TransportRoute::GetTypeString(type));
+}
+
const char* ServerLogEntry::GetValueMode(ServerLogEntry::Mode mode) {
switch(mode) {
case IT2ME:
@@ -116,7 +124,7 @@ const char* ServerLogEntry::GetValueSessionState(bool connected) {
return connected ? kValueSessionStateConnected : kValueSessionStateClosed;
}
-void ServerLogEntry::Set(const char* key, const char* value) {
+void ServerLogEntry::Set(const std::string& key, const std::string& value) {
values_map_[key] = value;
}
« no previous file with comments | « remoting/host/server_log_entry.h ('k') | remoting/protocol/connection_to_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698