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

Side by Side Diff: remoting/webapp/me2mom/client_screen.js

Issue 8865005: The chromoting client logs connection statistics to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review. Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « remoting/webapp/me2mom/choice.html ('k') | remoting/webapp/me2mom/client_session.js » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 * Functions related to the 'client screen' for Chromoting. 7 * Functions related to the 'client screen' for Chromoting.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 381 }
382 382
383 /** 383 /**
384 * Timer callback to update the statistics panel. 384 * Timer callback to update the statistics panel.
385 */ 385 */
386 function updateStatistics_() { 386 function updateStatistics_() {
387 if (!remoting.clientSession || 387 if (!remoting.clientSession ||
388 remoting.clientSession.state != remoting.ClientSession.State.CONNECTED) { 388 remoting.clientSession.state != remoting.ClientSession.State.CONNECTED) {
389 return; 389 return;
390 } 390 }
391 remoting.debug.updateStatistics(remoting.clientSession.stats()); 391 var stats = remoting.clientSession.stats();
392 remoting.debug.updateStatistics(stats);
393 remoting.clientSession.logStatistics(stats);
392 // Update the stats once per second. 394 // Update the stats once per second.
393 window.setTimeout(updateStatistics_, 1000); 395 window.setTimeout(updateStatistics_, 1000);
394 } 396 }
395 397
396 398
397 /** 399 /**
398 * Start a connection to the specified host, using the stored details. 400 * Start a connection to the specified host, using the stored details.
399 * 401 *
400 * @param {string} hostJid The jabber Id of the host. 402 * @param {string} hostJid The jabber Id of the host.
401 * @param {string} hostPublicKey The public key of the host. 403 * @param {string} hostPublicKey The public key of the host.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 var createPluginAndConnect = function(token) { 441 var createPluginAndConnect = function(token) {
440 remoting.clientSession.createPluginAndConnect( 442 remoting.clientSession.createPluginAndConnect(
441 document.getElementById('session-mode'), 443 document.getElementById('session-mode'),
442 token); 444 token);
443 }; 445 };
444 446
445 remoting.oauth2.callWithToken(createPluginAndConnect); 447 remoting.oauth2.callWithToken(createPluginAndConnect);
446 } 448 }
447 449
448 }()); 450 }());
OLDNEW
« no previous file with comments | « remoting/webapp/me2mom/choice.html ('k') | remoting/webapp/me2mom/client_session.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698