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

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

Issue 917093003: Shorten Closure template notation from Array.<*> to Array<*>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove cvox Created 5 years, 10 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/it2me_service.js ('k') | remoting/webapp/crd/js/oauth2.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) 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 * Module for sending log entries to the server. 7 * Module for sending log entries to the server.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 remoting.LogToServer.shouldAddDuration_ = function(state) { 153 remoting.LogToServer.shouldAddDuration_ = function(state) {
154 // Duration is added to log entries at the end of the session, as well as at 154 // Duration is added to log entries at the end of the session, as well as at
155 // some intermediate states where it is relevant (e.g. to determine how long 155 // some intermediate states where it is relevant (e.g. to determine how long
156 // it took for a session to become CONNECTED). 156 // it took for a session to become CONNECTED).
157 return (remoting.LogToServer.isEndOfSession_(state) || 157 return (remoting.LogToServer.isEndOfSession_(state) ||
158 (state == remoting.ClientSession.State.CONNECTED)); 158 (state == remoting.ClientSession.State.CONNECTED));
159 }; 159 };
160 160
161 /** 161 /**
162 * Logs connection statistics. 162 * Logs connection statistics.
163 * @param {Object.<string, number>} stats The connection statistics 163 * @param {Object<string, number>} stats The connection statistics
164 */ 164 */
165 remoting.LogToServer.prototype.logStatistics = function(stats) { 165 remoting.LogToServer.prototype.logStatistics = function(stats) {
166 this.maybeExpireSessionId_(); 166 this.maybeExpireSessionId_();
167 // Store the statistics. 167 // Store the statistics.
168 this.statsAccumulator_.add(stats); 168 this.statsAccumulator_.add(stats);
169 // Send statistics to the server if they've been accumulating for at least 169 // Send statistics to the server if they've been accumulating for at least
170 // 60 seconds. 170 // 60 seconds.
171 if (this.statsAccumulator_.getTimeSinceFirstValue() >= 171 if (this.statsAccumulator_.getTimeSinceFirstValue() >=
172 remoting.LogToServer.CONNECTION_STATS_ACCUMULATE_TIME) { 172 remoting.LogToServer.CONNECTION_STATS_ACCUMULATE_TIME) {
173 this.logAccumulatedStatistics_(); 173 this.logAccumulatedStatistics_();
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 remoting.LogToServer.generateSessionId_ = function() { 270 remoting.LogToServer.generateSessionId_ = function() {
271 var idArray = []; 271 var idArray = [];
272 for (var i = 0; i < remoting.LogToServer.SESSION_ID_LEN_; i++) { 272 for (var i = 0; i < remoting.LogToServer.SESSION_ID_LEN_; i++) {
273 var index = 273 var index =
274 Math.random() * remoting.LogToServer.SESSION_ID_ALPHABET_.length; 274 Math.random() * remoting.LogToServer.SESSION_ID_ALPHABET_.length;
275 idArray.push( 275 idArray.push(
276 remoting.LogToServer.SESSION_ID_ALPHABET_.slice(index, index + 1)); 276 remoting.LogToServer.SESSION_ID_ALPHABET_.slice(index, index + 1));
277 } 277 }
278 return idArray.join(''); 278 return idArray.join('');
279 }; 279 };
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/it2me_service.js ('k') | remoting/webapp/crd/js/oauth2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698