Chromium Code Reviews| Index: remoting/host/server_log_entry.cc |
| diff --git a/remoting/host/server_log_entry.cc b/remoting/host/server_log_entry.cc |
| index f18b2378d2673da82082e78b100c217c6e3ebae4..19c1a07623ef6ff469777e037ea6e324462a819f 100644 |
| --- a/remoting/host/server_log_entry.cc |
| +++ b/remoting/host/server_log_entry.cc |
| @@ -26,6 +26,7 @@ const char kLogEntry[] = "entry"; |
| const char kKeyEventName[] = "event-name"; |
| const char kValueEventNameSessionState[] = "session-state"; |
| const char kValueEventNameHeartbeat[] = "heartbeat"; |
| +const char kValueEventNameHostStatus[] = "host-status"; |
| const char kKeyRole[] = "role"; |
| const char kValueRoleHost[] = "host"; |
| @@ -84,6 +85,14 @@ scoped_ptr<ServerLogEntry> ServerLogEntry::MakeForHeartbeat() { |
| return entry.Pass(); |
| } |
| +// static |
| +scoped_ptr<ServerLogEntry> ServerLogEntry::MakeForHostStatus() { |
| + scoped_ptr<ServerLogEntry> entry(new ServerLogEntry()); |
| + entry->Set(kKeyRole, kValueRoleHost); |
| + entry->Set(kKeyEventName, kValueEventNameHostStatus); |
| + return entry.Pass(); |
| +} |
| + |
| void ServerLogEntry::AddHostFields() { |
| #if defined(OS_WIN) |
| Set(kKeyOsName, kValueOsNameWindows); |
| @@ -135,6 +144,11 @@ const char* ServerLogEntry::GetValueMode(ServerLogEntry::Mode mode) { |
| } |
| } |
| +void ServerLogEntry::AddCustomField(const std::string& name, |
|
rmsousa
2013/07/09 03:13:41
Could you pass the host_status and exit_code value
weitao
2013/07/09 19:02:17
I think the ServerLogEntry class should be general
|
| + const std::string& value) { |
| + Set(name, value); |
| +} |
| + |
| scoped_ptr<XmlElement> ServerLogEntry::ToStanza() const { |
| scoped_ptr<XmlElement> stanza(new XmlElement(QName( |
| kChromotingXmlNamespace, kLogEntry))); |