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

Side by Side Diff: remoting/webapp/crd/js/server_log_entry.js

Issue 961053004: Rename elapsed-time field in Chromoting log events to session-duration, to align with server-side f… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « remoting/webapp/crd/js/log_to_server.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * A class of server log entries. 7 * A class of server log entries.
8 * 8 *
9 * Any changes to the values here need to be coordinated with the host and 9 * Any changes to the values here need to be coordinated with the host and
10 * server/log proto code. 10 * server/log proto code.
(...skipping 29 matching lines...) Expand all
40 /** @private */ 40 /** @private */
41 remoting.ServerLogEntry.KEY_SESSION_STATE_ = 'session-state'; 41 remoting.ServerLogEntry.KEY_SESSION_STATE_ = 'session-state';
42 /** @private */ 42 /** @private */
43 remoting.ServerLogEntry.KEY_CONNECTION_TYPE_ = 'connection-type'; 43 remoting.ServerLogEntry.KEY_CONNECTION_TYPE_ = 'connection-type';
44 /** @private */ 44 /** @private */
45 remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_TYPE_ = 'signal-strategy-type'; 45 remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_TYPE_ = 'signal-strategy-type';
46 /** @private */ 46 /** @private */
47 remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_PROGRESS_ = 47 remoting.ServerLogEntry.KEY_SIGNAL_STRATEGY_PROGRESS_ =
48 'signal-strategy-progress'; 48 'signal-strategy-progress';
49 /** @private */ 49 /** @private */
50 remoting.ServerLogEntry.KEY_ELAPSED_TIME_MS_ = 'elapsed-time'; 50 remoting.ServerLogEntry.KEY_SESSION_DURATION_SECONDS_ = 'session-duration';
51 51
52 52
53 /** 53 /**
54 * @private 54 * @private
55 * @param {remoting.ClientSession.State} state 55 * @param {remoting.ClientSession.State} state
56 * @return {string} 56 * @return {string}
57 */ 57 */
58 remoting.ServerLogEntry.getValueForSessionState_ = function(state) { 58 remoting.ServerLogEntry.getValueForSessionState_ = function(state) {
59 switch(state) { 59 switch(state) {
60 case remoting.ClientSession.State.UNKNOWN: 60 case remoting.ClientSession.State.UNKNOWN:
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 return { 444 return {
445 'os_name': remoting.ServerLogEntry.VALUE_OS_NAME_CHROMEOS_, 445 'os_name': remoting.ServerLogEntry.VALUE_OS_NAME_CHROMEOS_,
446 'os_version': match[2], 446 'os_version': match[2],
447 'cpu': match[1] 447 'cpu': match[1]
448 }; 448 };
449 } 449 }
450 return null; 450 return null;
451 }; 451 };
452 452
453 /** 453 /**
454 * Adds a field to this log entry specifying the elapsed time since the start of 454 * Adds a field to this log entry specifying the time in seconds since the start
455 * the session to the current session state. 455 * of the session to the current event.
456 * @param {number} elapsedTimeInMs 456 * @param {number} sessionDurationInSeconds
457 */ 457 */
458 remoting.ServerLogEntry.prototype.addElapsedTimeMs = 458 remoting.ServerLogEntry.prototype.addSessionDuration =
459 function(elapsedTimeInMs) { 459 function(sessionDurationInSeconds) {
460 this.set_(remoting.ServerLogEntry.KEY_ELAPSED_TIME_MS_, 460 this.set_(remoting.ServerLogEntry.KEY_SESSION_DURATION_SECONDS_,
461 String(elapsedTimeInMs)); 461 String(sessionDurationInSeconds));
462 }; 462 };
463 463
464 464
465 /** 465 /**
466 * Adds a field specifying the browser version to this log entry. 466 * Adds a field specifying the browser version to this log entry.
467 */ 467 */
468 remoting.ServerLogEntry.prototype.addChromeVersionField = function() { 468 remoting.ServerLogEntry.prototype.addChromeVersionField = function() {
469 var version = remoting.getChromeVersion(); 469 var version = remoting.getChromeVersion();
470 if (version != null) { 470 if (version != null) {
471 this.set_(remoting.ServerLogEntry.KEY_BROWSER_VERSION_, version); 471 this.set_(remoting.ServerLogEntry.KEY_BROWSER_VERSION_, version);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 case remoting.DesktopConnectedView.Mode.IT2ME: 504 case remoting.DesktopConnectedView.Mode.IT2ME:
505 return remoting.ServerLogEntry.VALUE_MODE_IT2ME_; 505 return remoting.ServerLogEntry.VALUE_MODE_IT2ME_;
506 case remoting.DesktopConnectedView.Mode.ME2ME: 506 case remoting.DesktopConnectedView.Mode.ME2ME:
507 return remoting.ServerLogEntry.VALUE_MODE_ME2ME_; 507 return remoting.ServerLogEntry.VALUE_MODE_ME2ME_;
508 case remoting.DesktopConnectedView.Mode.APP_REMOTING: 508 case remoting.DesktopConnectedView.Mode.APP_REMOTING:
509 return remoting.ServerLogEntry.VALUE_MODE_APP_REMOTING_; 509 return remoting.ServerLogEntry.VALUE_MODE_APP_REMOTING_;
510 default: 510 default:
511 return remoting.ServerLogEntry.VALUE_MODE_UNKNOWN_; 511 return remoting.ServerLogEntry.VALUE_MODE_UNKNOWN_;
512 } 512 }
513 }; 513 };
OLDNEW
« 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