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

Unified Diff: remoting/host/heartbeat_sender.cc

Issue 10409017: [Chromoting] Add platform data to heartbeats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improve comments and formatting. Created 8 years, 7 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 | « no previous file | remoting/host/log_to_server.cc » ('j') | remoting/host/server_log_entry.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/heartbeat_sender.cc
diff --git a/remoting/host/heartbeat_sender.cc b/remoting/host/heartbeat_sender.cc
index 8420acf12c9f486a9ece4c30373fe1c582d5e74e..c188203141106e803e826543e3790ef74850ab14 100644
--- a/remoting/host/heartbeat_sender.cc
+++ b/remoting/host/heartbeat_sender.cc
@@ -14,6 +14,7 @@
#include "base/time.h"
#include "remoting/base/constants.h"
#include "remoting/host/constants.h"
+#include "remoting/host/server_log_entry.h"
#include "remoting/jingle_glue/iq_sender.h"
#include "remoting/jingle_glue/jingle_thread.h"
#include "remoting/jingle_glue/signal_strategy.h"
@@ -229,12 +230,19 @@ void HeartbeatSender::SetSequenceId(int sequence_id) {
}
scoped_ptr<XmlElement> HeartbeatSender::CreateHeartbeatMessage() {
+ // Create heartbeat stanza.
scoped_ptr<XmlElement> query(new XmlElement(
QName(kChromotingXmlNamespace, kHeartbeatQueryTag)));
query->AddAttr(QName(kChromotingXmlNamespace, kHostIdAttr), host_id_);
query->AddAttr(QName(kChromotingXmlNamespace, kSequenceIdAttr),
base::IntToString(sequence_id_));
query->AddElement(CreateSignature().release());
+ // Append log message (which isn't signed).
+ scoped_ptr<XmlElement> log(ServerLogEntry::MakeStanza());
+ scoped_ptr<ServerLogEntry> log_entry(ServerLogEntry::MakeForHeartbeat());
+ log_entry->AddHostFields();
+ log->AddElement(log_entry->ToStanza().release());
+ query->AddElement(log.release());
return query.Pass();
}
« no previous file with comments | « no previous file | remoting/host/log_to_server.cc » ('j') | remoting/host/server_log_entry.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698