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

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

Issue 689473004: Add connection type to connection stats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed typo. Created 6 years, 1 month 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 | « remoting/webapp/crd/js/log_to_server.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 557f014c042098d09c97a975e52d04c930809049..d33722211fe4674cde649c10f007d2983d8209c7 100644
--- a/remoting/webapp/crd/js/server_log_entry.js
+++ b/remoting/webapp/crd/js/server_log_entry.js
@@ -23,19 +23,17 @@ remoting.ServerLogEntry = function() {
/** @private */
remoting.ServerLogEntry.KEY_EVENT_NAME_ = 'event-name';
/** @private */
-remoting.ServerLogEntry.VALUE_EVENT_NAME_SESSION_STATE_ =
- 'session-state';
-
+remoting.ServerLogEntry.VALUE_EVENT_NAME_SESSION_STATE_ = 'session-state';
/** @private */
remoting.ServerLogEntry.KEY_SESSION_ID_ = 'session-id';
-
/** @private */
remoting.ServerLogEntry.KEY_ROLE_ = 'role';
/** @private */
remoting.ServerLogEntry.VALUE_ROLE_CLIENT_ = 'client';
-
/** @private */
remoting.ServerLogEntry.KEY_SESSION_STATE_ = 'session-state';
+/** @private */
+remoting.ServerLogEntry.KEY_CONNECTION_TYPE_ = 'connection-type';
/**
* @private
@@ -241,15 +239,22 @@ remoting.ServerLogEntry.prototype.addSessionDurationField = function(
* Returns null if all the statistics were zero.
*
* @param {remoting.StatsAccumulator} statsAccumulator
+ * @param {string} connectionType
* @param {remoting.ClientSession.Mode} mode
* @return {?remoting.ServerLogEntry}
*/
-remoting.ServerLogEntry.makeStats = function(statsAccumulator, mode) {
+remoting.ServerLogEntry.makeStats = function(statsAccumulator,
+ connectionType,
+ mode) {
var entry = new remoting.ServerLogEntry();
entry.set(remoting.ServerLogEntry.KEY_ROLE_,
remoting.ServerLogEntry.VALUE_ROLE_CLIENT_);
entry.set(remoting.ServerLogEntry.KEY_EVENT_NAME_,
remoting.ServerLogEntry.VALUE_EVENT_NAME_CONNECTION_STATISTICS_);
+ if (connectionType) {
+ entry.set(remoting.ServerLogEntry.KEY_CONNECTION_TYPE_,
+ connectionType);
+ }
entry.addModeField(mode);
var nonZero = false;
nonZero |= entry.addStatsField(
« no previous file with comments | « 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