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; |
} |