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 87cb039e4f7fb578b01aa5ac5f814b7a4a9e84df..a35b664a5084e74f8e932543f9efd1f0f70ec79c 100644 |
| --- a/remoting/webapp/crd/js/log_to_server.js |
| +++ b/remoting/webapp/crd/js/log_to_server.js |
| @@ -22,6 +22,8 @@ remoting.LogToServer = function(signalStrategy) { |
| /** @private */ |
| this.sessionId_ = ''; |
| /** @private */ |
| + this.applicationId_ = ''; |
|
anandc
2015/04/23 00:38:32
There are a few different ways we could track the
Jamie
2015/04/23 00:54:38
With my suggested change it's just a property acce
|
| + /** @private */ |
| this.sessionIdGenerationTime_ = 0; |
| /** @private */ |
| this.sessionStartTime_ = new Date().getTime(); |
| @@ -31,6 +33,7 @@ remoting.LogToServer = function(signalStrategy) { |
| this.connectionType_ = ''; |
| this.setSessionId_(); |
| + this.setApplicationId_(); |
| signalStrategy.sendConnectionSetupResults(this); |
| }; |
| @@ -174,6 +177,7 @@ remoting.LogToServer.prototype.log_ = function(entry) { |
| var sessionDurationInSeconds = |
| (new Date().getTime() - this.sessionStartTime_) / 1000.0; |
| entry.addSessionDuration(sessionDurationInSeconds); |
| + entry.addApplicationId(this.applicationId_); |
| // Send the stanza to the debug log. |
| console.log('Enqueueing log entry:'); |
| @@ -199,6 +203,15 @@ remoting.LogToServer.prototype.setSessionId_ = function() { |
| }; |
| /** |
| + * Sets the application ID for this session. |
| + * |
| + * @private |
| + */ |
| +remoting.LogToServer.prototype.setApplicationId_ = function() { |
| + this.applicationId_ = chrome.i18n.getMessage('@@extension_id'); |
|
Jamie
2015/04/23 00:54:38
chrome.runtime.id would be a better way of getting
anandc
2015/04/23 01:26:59
Done.
rmsousa
2015/04/23 01:55:51
Drive-by:
For app remoting, there are cases (e.g.
|
| +}; |
| + |
| +/** |
| * Clears the session ID. |
| * |
| * @private |