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

Side by Side Diff: chrome/browser/resources/task_manager/measure_time.js

Issue 10095003: [WebUI TaskManager] Fix JS check nits in chrome/browser/resources/task_manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
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 Utility methods for measuring loading times. 6 * @fileoverview Utility methods for measuring loading times.
7 * 7 *
8 * To be included as a first script in main.html 8 * To be included as a first script in main.html
9 */ 9 */
10 10
11 /**
12 * measureTime class
13 * @constructor
14 */
11 var measureTime = { 15 var measureTime = {
12 isEnabled: localStorage.measureTimeEnabled, 16 isEnabled: localStorage.measureTimeEnabled,
13 17
14 startInterval: function(name) { 18 startInterval: function(name) {
15 if (this.isEnabled) 19 if (this.isEnabled)
16 console.time(name); 20 console.time(name);
17 }, 21 },
18 22
19 recordInterval: function(name) { 23 recordInterval: function(name) {
20 if (this.isEnabled) 24 if (this.isEnabled)
21 console.timeEnd(name); 25 console.timeEnd(name);
22 }, 26 },
23 }; 27 };
24 28
25 measureTime.startInterval('Load.Total'); 29 measureTime.startInterval('Load.Total');
26 measureTime.startInterval('Load.Script'); 30 measureTime.startInterval('Load.Script');
OLDNEW
« no previous file with comments | « chrome/browser/resources/task_manager/main.js ('k') | chrome/browser/resources/task_manager/preload.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698