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

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

Issue 1066003007: Include application ID in log entries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | remoting/webapp/crd/js/server_log_entry.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | remoting/webapp/crd/js/server_log_entry.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698