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

Side by Side Diff: chrome/browser/resources/quota_internals/event_handler.js

Issue 2900253006: WebUI: Fix more violations of no-extra-semi lint rule. (Closed)
Patch Set: clang-format Created 3 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 unified diff | Download patch
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 // require cr.js 5 // require cr.js
6 // require cr/event_target.js 6 // require cr/event_target.js
7 // require cr/ui.js 7 // require cr/ui.js
8 // require cr/ui/tabs.js 8 // require cr/ui/tabs.js
9 // require cr/ui/tree.js 9 // require cr/ui/tree.js
10 // require cr/util.js 10 // require cr/util.js
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 * |event.detail| contains |availableSpace|. 263 * |event.detail| contains |availableSpace|.
264 * |availableSpace| represents total available disk space. 264 * |availableSpace| represents total available disk space.
265 * @param {CustomEvent} event AvailableSpaceUpdated event. 265 * @param {CustomEvent} event AvailableSpaceUpdated event.
266 */ 266 */
267 function handleAvailableSpace(event) { 267 function handleAvailableSpace(event) {
268 /** 268 /**
269 * @type {string} 269 * @type {string}
270 */ 270 */
271 availableSpace = event.detail; 271 availableSpace = event.detail;
272 $('diskspace-entry').innerHTML = numBytesToText_(availableSpace); 272 $('diskspace-entry').innerHTML = numBytesToText_(availableSpace);
273 }; 273 }
274 274
275 /** 275 /**
276 * Event Handler for |cr.quota.onGlobalInfoUpdated|. 276 * Event Handler for |cr.quota.onGlobalInfoUpdated|.
277 * |event.detail| contains a record which has: 277 * |event.detail| contains a record which has:
278 * |type|: 278 * |type|:
279 * Storage type, that is either 'temporary' or 'persistent'. 279 * Storage type, that is either 'temporary' or 'persistent'.
280 * |usage|: 280 * |usage|:
281 * Total storage usage of all hosts. 281 * Total storage usage of all hosts.
282 * |unlimitedUsage|: 282 * |unlimitedUsage|:
283 * Total storage usage of unlimited-quota origins. 283 * Total storage usage of unlimited-quota origins.
(...skipping 13 matching lines...) Expand all
297 * quota: {?string} 297 * quota: {?string}
298 * }} 298 * }}
299 */ 299 */
300 var data = event.detail; 300 var data = event.detail;
301 var storageObject = getStorageObject(data.type); 301 var storageObject = getStorageObject(data.type);
302 copyAttributes_(data, storageObject.detail.payload); 302 copyAttributes_(data, storageObject.detail.payload);
303 storageObject.reveal(); 303 storageObject.reveal();
304 if (getTreeViewObject().selectedItem == storageObject) 304 if (getTreeViewObject().selectedItem == storageObject)
305 updateDescription(); 305 updateDescription();
306 306
307 }; 307 }
308 308
309 /** 309 /**
310 * Event Handler for |cr.quota.onPerHostInfoUpdated|. 310 * Event Handler for |cr.quota.onPerHostInfoUpdated|.
311 * |event.detail| contains records which have: 311 * |event.detail| contains records which have:
312 * |host|: 312 * |host|:
313 * Hostname of the entry. (e.g. 'example.com') 313 * Hostname of the entry. (e.g. 'example.com')
314 * |type|: 314 * |type|:
315 * Storage type. 'temporary' or 'persistent' 315 * Storage type. 'temporary' or 'persistent'
316 * |usage|: 316 * |usage|:
317 * Total storage usage of the host. 317 * Total storage usage of the host.
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 handlePerOriginInfo); 527 handlePerOriginInfo);
528 cr.quota.onStatisticsUpdated.addEventListener('update', handleStatistics); 528 cr.quota.onStatisticsUpdated.addEventListener('update', handleStatistics);
529 cr.quota.requestInfo(); 529 cr.quota.requestInfo();
530 530
531 $('refresh-button').addEventListener('click', cr.quota.requestInfo, false); 531 $('refresh-button').addEventListener('click', cr.quota.requestInfo, false);
532 $('dump-button').addEventListener('click', dump, false); 532 $('dump-button').addEventListener('click', dump, false);
533 } 533 }
534 534
535 cr.doc.addEventListener('DOMContentLoaded', onLoad, false); 535 cr.doc.addEventListener('DOMContentLoaded', onLoad, false);
536 })(); 536 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698