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

Side by Side Diff: chrome/browser/resources/about_invalidations.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 | « no previous file | chrome/browser/resources/about_version.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 cr.define('chrome.invalidations', function() { 5 cr.define('chrome.invalidations', function() {
6 /** 6 /**
7 * Local variable where we maintain a count of the invalidations received 7 * Local variable where we maintain a count of the invalidations received
8 * and of every ObjectId that has ever been updated (note that this doesn't 8 * and of every ObjectId that has ever been updated (note that this doesn't
9 * log any invalidations ocurred prior to opening the about:invalidation 9 * log any invalidations ocurred prior to opening the about:invalidation
10 * page). 10 * page).
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 var logMessage = nowTimeString() + 61 var logMessage = nowTimeString() +
62 'Invalidations service state changed to ' + quote(newState); 62 'Invalidations service state changed to ' + quote(newState);
63 63
64 appendToLog(logMessage); 64 appendToLog(logMessage);
65 $('invalidations-state').textContent = newState + ' (since ' + 65 $('invalidations-state').textContent = newState + ' (since ' +
66 new Date(lastChangedTime) + ')'; 66 new Date(lastChangedTime) + ')';
67 } 67 }
68 68
69 /** 69 /**
70 * Adds to the log the latest invalidations received 70 * Adds to the log the latest invalidations received
71 * @param {!Array.<!Object>} allInvalidations The array of ObjectId 71 * @param {!Array<!Object>} allInvalidations The array of ObjectId
72 * that contains the invalidations received by the InvalidatorService. 72 * that contains the invalidations received by the InvalidatorService.
73 */ 73 */
74 function logInvalidations(allInvalidations) { 74 function logInvalidations(allInvalidations) {
75 for (var i = 0; i < allInvalidations.length; i++) { 75 for (var i = 0; i < allInvalidations.length; i++) {
76 var inv = allInvalidations[i]; 76 var inv = allInvalidations[i];
77 if (inv.hasOwnProperty('objectId')) { 77 if (inv.hasOwnProperty('objectId')) {
78 var logMessage = nowTimeString() + 78 var logMessage = nowTimeString() +
79 'Received Invalidation with type ' + 79 'Received Invalidation with type ' +
80 quote(inv.objectId.name) + 80 quote(inv.objectId.name) +
81 ' version ' + 81 ' version ' +
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 tableObjects[key].sessionCount = tableObjects[key].sessionCount + 1; 132 tableObjects[key].sessionCount = tableObjects[key].sessionCount + 1;
133 tableObjects[key].time = time.toTimeString(); 133 tableObjects[key].time = time.toTimeString();
134 tableObjects[key].version = version; 134 tableObjects[key].version = version;
135 tableObjects[key].payload = payload; 135 tableObjects[key].payload = payload;
136 } 136 }
137 } 137 }
138 138
139 /** 139 /**
140 * Shows the handlers that are currently registered for invalidations 140 * Shows the handlers that are currently registered for invalidations
141 * (but might not have objects ids registered yet). 141 * (but might not have objects ids registered yet).
142 * @param {!Array.<string>} allHandlers An array of Strings that are 142 * @param {!Array<string>} allHandlers An array of Strings that are
143 * the names of all the handlers currently registered in the 143 * the names of all the handlers currently registered in the
144 * InvalidatorService. 144 * InvalidatorService.
145 */ 145 */
146 function updateHandlers(allHandlers) { 146 function updateHandlers(allHandlers) {
147 var allHandlersFormatted = allHandlers.join(', '); 147 var allHandlersFormatted = allHandlers.join(', ');
148 $('registered-handlers').textContent = allHandlersFormatted; 148 $('registered-handlers').textContent = allHandlersFormatted;
149 var logMessage = nowTimeString() + 149 var logMessage = nowTimeString() +
150 'InvalidatorHandlers currently registered: ' + allHandlersFormatted; 150 'InvalidatorHandlers currently registered: ' + allHandlersFormatted;
151 appendToLog(logMessage); 151 appendToLog(logMessage);
152 } 152 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 logInvalidations: logInvalidations, 204 logInvalidations: logInvalidations,
205 onLoadWork: onLoadWork, 205 onLoadWork: onLoadWork,
206 updateDetailedStatus: updateDetailedStatus, 206 updateDetailedStatus: updateDetailedStatus,
207 updateHandlers: updateHandlers, 207 updateHandlers: updateHandlers,
208 updateIds: updateIds, 208 updateIds: updateIds,
209 updateInvalidatorState: updateInvalidatorState, 209 updateInvalidatorState: updateInvalidatorState,
210 }; 210 };
211 }); 211 });
212 212
213 document.addEventListener('DOMContentLoaded', chrome.invalidations.onLoadWork); 213 document.addEventListener('DOMContentLoaded', chrome.invalidations.onLoadWork);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/about_version.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698