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

Unified Diff: remoting/host/server_log_entry.cc

Issue 18075003: Host offline status reporting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 5 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/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)));

Powered by Google App Engine
This is Rietveld 408576698