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

Unified Diff: remoting/host/heartbeat_sender.cc

Issue 12221123: Include version information in heartbeats. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | no next file » | no next file with comments »
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 0a5a1815342e89d142b47f2becc0bf59af54d14a..95e954931e1244f27b3d24cf7017082637bfc76f 100644
--- a/remoting/host/heartbeat_sender.cc
+++ b/remoting/host/heartbeat_sender.cc
@@ -11,6 +11,7 @@
#include "base/message_loop_proxy.h"
#include "base/rand_util.h"
#include "base/string_number_conversions.h"
+#include "base/strings/stringize_macros.h"
#include "base/time.h"
#include "remoting/base/constants.h"
#include "remoting/host/server_log_entry.h"
@@ -28,6 +29,7 @@ namespace {
const char kHeartbeatQueryTag[] = "heartbeat";
const char kHostIdAttr[] = "hostid";
+const char kHostVersionAttr[] = "host-version";
const char kHeartbeatSignatureTag[] = "signature";
const char kSequenceIdAttr[] = "sequence-id";
@@ -241,6 +243,8 @@ scoped_ptr<XmlElement> HeartbeatSender::CreateHeartbeatMessage() {
query->AddAttr(QName(kChromotingXmlNamespace, kHostIdAttr), host_id_);
query->AddAttr(QName(kChromotingXmlNamespace, kSequenceIdAttr),
base::IntToString(sequence_id_));
+ query->AddAttr(QName(kChromotingXmlNamespace, kHostVersionAttr),
Sergey Ulanov 2013/02/11 20:29:11 nit: Does this need to be an attribute? It may be
Jamie 2013/02/11 20:41:25 Either works for me. I'd be interested to know wha
Sergey Ulanov 2013/02/11 21:40:49 There are no hard rules about it, but in general e
Jamie 2013/02/13 18:25:26 Thanks for the summary. Done.
+ STRINGIZE(VERSION));
query->AddElement(CreateSignature().release());
// Append log message (which isn't signed).
scoped_ptr<XmlElement> log(ServerLogEntry::MakeStanza());
Sergey Ulanov 2013/02/11 20:29:11 The log entry should already include information a
Jamie 2013/02/11 20:41:25 Renato suggested that in the bug discussion, but d
Sergey Ulanov 2013/02/11 21:40:49 Yes. I agree. Given that we want to store this inf
Jamie 2013/02/13 18:25:26 So it sounds like you're in favour of the approach
Sergey Ulanov 2013/02/13 18:53:15 Yes, I'm in favor of this approach. Sorry for not
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698