Chromium Code Reviews| 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; |
| +}; |
| + |