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

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

Issue 953223002: Include time elapsed since start of a remoting session in each log entry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Calculate elapsed time for the signal strategy progress event as well. Created 5 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
Index: remoting/webapp/crd/js/server_log_entry.js
diff --git a/remoting/webapp/crd/js/server_log_entry.js b/remoting/webapp/crd/js/server_log_entry.js
index 7d848aa5b5a4a089f8909778f7108508fd933a75..6f4490b6812acd7e6b140cbac8138e030db29166 100644
--- a/remoting/webapp/crd/js/server_log_entry.js
+++ b/remoting/webapp/crd/js/server_log_entry.js
@@ -47,8 +47,10 @@ remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_TYPE_ = 'signal-strategy-type';
remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_PROGRESS_ =
'signal-strategy-progress';
/** @private */
-remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_ELAPSED_TIME_ =
- 'signal-strategy-elapsed-time';
+remoting.ServerLogEntry.KEY_ELAPSED_TIME_MS_ =
+ 'elapsed-time';
Jamie 2015/02/27 02:24:46 This will now all fit on one line.
anandc 2015/02/27 21:49:29 Done.
+
+
/**
* @private
@@ -357,11 +359,10 @@ remoting.ServerLogEntry.makeSessionIdNew = function(sessionId, mode) {
* @param {string} sessionId
* @param {remoting.SignalStrategy.Type} strategyType
* @param {remoting.FallbackSignalStrategy.Progress} progress
- * @param {number} elapsedTimeInMs
* @return {remoting.ServerLogEntry}
*/
remoting.ServerLogEntry.makeSignalStrategyProgress =
- function(sessionId, strategyType, progress, elapsedTimeInMs) {
+ function(sessionId, strategyType, progress) {
var entry = new remoting.ServerLogEntry();
entry.set_(remoting.ServerLogEntry.KEY_ROLE_,
remoting.ServerLogEntry.VALUE_ROLE_CLIENT_);
@@ -371,8 +372,6 @@ remoting.ServerLogEntry.makeSignalStrategyProgress =
entry.addSessionIdField(sessionId);
entry.set_(remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_TYPE_, strategyType);
entry.set_(remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_PROGRESS_, progress);
- entry.set_(remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_ELAPSED_TIME_,
- String(elapsedTimeInMs));
return entry;
};
@@ -467,6 +466,18 @@ remoting.ServerLogEntry.extractHostDataFrom_ = function(s) {
};
/**
+ * Adds a field to this log entry specifying the elapsed time since the start of
+ * the session to the current session state.
+ * @param {number} elapsedTimeInMs
+ */
+remoting.ServerLogEntry.prototype.addElapsedTimeMs =
+ function(elapsedTimeInMs) {
+ this.set_(remoting.ServerLogEntry.KEY_ELAPSED_TIME_MS_,
+ String(elapsedTimeInMs));
+};
+
+
+/**
* Adds a field specifying the browser version to this log entry.
*/
remoting.ServerLogEntry.prototype.addChromeVersionField = function() {
« remoting/webapp/crd/js/log_to_server.js ('K') | « remoting/webapp/crd/js/log_to_server.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698