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

Unified Diff: remoting/webapp/crd/js/log_to_server.js

Issue 1103913002: Start logging host-version info in the Chromoting client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment. Created 5 years, 8 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/webapp/crd/js/log_to_server.js
diff --git a/remoting/webapp/crd/js/log_to_server.js b/remoting/webapp/crd/js/log_to_server.js
index e76f67a6662b33bb9e1202d3e25b0ffbb7f1c524..d03616fba9221a93f1b593969981dbdffb663c5c 100644
--- a/remoting/webapp/crd/js/log_to_server.js
+++ b/remoting/webapp/crd/js/log_to_server.js
@@ -31,6 +31,8 @@ remoting.LogToServer = function(signalStrategy) {
this.connectionType_ = '';
/** @private */
this.authTotalTime_ = 0;
+ /** @private {string} */
+ this.hostVersion_ = '';
this.setSessionId_();
signalStrategy.sendConnectionSetupResults(this);
@@ -178,6 +180,9 @@ remoting.LogToServer.prototype.log_ = function(entry) {
(new Date().getTime() - this.sessionStartTime_ -
this.authTotalTime_) / 1000.0;
entry.addSessionDuration(sessionDurationInSeconds);
+ // The host-version will be blank for logs before a session has been created.
+ // For example, the signal-strategy log-entries won't have host version info.
Jamie 2015/04/24 20:34:02 Is this true even for multiple connections from th
anandc 2015/04/24 21:36:35 Yes. It's because a new logToServer object is crea
+ entry.addHostVersion(this.hostVersion_);
// Send the stanza to the debug log.
console.log('Enqueueing log entry:');
@@ -260,3 +265,11 @@ remoting.LogToServer.prototype.setAuthTotalTime = function(totalTime) {
this.authTotalTime_ = totalTime;
};
+/**
+ * @param {string} hostVersion Version of the host for current session.
+ * @return {void} Nothing.
+ */
+remoting.LogToServer.prototype.setHostVersion = function(hostVersion) {
+ this.hostVersion_ = hostVersion;
+};
+

Powered by Google App Engine
This is Rietveld 408576698