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

Unified Diff: remoting/webapp/connection_stats.js

Issue 126123002: Show connection type in web-app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/connection_stats.js
diff --git a/remoting/webapp/connection_stats.js b/remoting/webapp/connection_stats.js
index b9c77bf416d351de3168a020eb64ac4f06945e43..7f8cd033814a63d90148b309c9d478e3957acec8 100644
--- a/remoting/webapp/connection_stats.js
+++ b/remoting/webapp/connection_stats.js
@@ -63,7 +63,7 @@ remoting.ConnectionStats.prototype.update = function(stats) {
}
var statistics = document.getElementById('statistics');
- this.statsElement.innerText = (
+ var statsString = (
'Bandwidth: ' + formatStatNumber(videoBandwidth, units) +
', Frame Rate: ' + formatStatNumber(stats.videoFrameRate, 'fps') +
', Capture: ' + formatStatNumber(stats.captureLatency, 'ms') +
@@ -71,6 +71,23 @@ remoting.ConnectionStats.prototype.update = function(stats) {
', Decode: ' + formatStatNumber(stats.decodeLatency, 'ms') +
', Render: ' + formatStatNumber(stats.renderLatency, 'ms') +
', Latency: ' + formatStatNumber(stats.roundtripLatency, 'ms'));
+ var channelType = '';
+ var allChannelTypesMatch = true;
+ var channelTypesString = '';
+ for (var channel in stats.channelTypes) {
+ if (channelType == '') {
+ channelType = stats.channelTypes[channel];
+ } else if (stats.channelTypes[channel] != channelType) {
+ allChannelTypesMatch = false;
+ }
+ channelTypesString += ', ' + channel + ': ' + stats.channelTypes[channel];
+ }
+ if (allChannelTypesMatch) {
+ statsString += ', connection: ' + channelType;
+ } else {
+ statsString += channelTypesString;
+ }
+ this.statsElement.innerText = statsString;
};
/**
« remoting/webapp/client_plugin_async.js ('K') | « remoting/webapp/client_session.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698