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

Unified Diff: remoting/webapp/base/js/connection_stats.js

Issue 2004673002: Initialize remoting.ClientSession.PerfStats with zeros (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's Feedback Created 4 years, 7 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 | « remoting/webapp/base/js/client_session.js ('k') | remoting/webapp/base/js/stats_accumulator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/base/js/connection_stats.js
diff --git a/remoting/webapp/base/js/connection_stats.js b/remoting/webapp/base/js/connection_stats.js
index 9d163663d380abf25cc7614c82c3fc498417d96e..8cd300e0d4142d364b12299b05d9f7ad98c5d25a 100644
--- a/remoting/webapp/base/js/connection_stats.js
+++ b/remoting/webapp/base/js/connection_stats.js
@@ -127,11 +127,7 @@ remoting.ConnectionStats.prototype.update = function(stats) {
* @return {string} Formatted number.
*/
function formatStatNumber(value, units, digits) {
- if (value != undefined) {
- return value.toFixed(digits) + ' ' + units;
- } else {
- return "n/a";
- }
+ return value.toFixed(digits) + ' ' + units;
}
/**
@@ -141,8 +137,7 @@ remoting.ConnectionStats.prototype.update = function(stats) {
* @return {string} "type: avg, max; " e.g. "RTT: 8.0, 13; "
*/
function formatStat(type, avg, max) {
- var avgStr = (avg == undefined) ? 'n/a' : avg.toFixed(1);
- return type + ': ' + avgStr + ', ' + max + '; ';
+ return type + ': ' + avg.toFixed(1) + ', ' + max + '; ';
}
var statistics = document.getElementById('statistics');
« no previous file with comments | « remoting/webapp/base/js/client_session.js ('k') | remoting/webapp/base/js/stats_accumulator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698