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

Side by Side Diff: chrome/browser/resources/file_manager/js/directory_model.js

Issue 22815003: Add detailed performance histograms to Files.app. (Abandoned) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed + rebased. Created 7 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager.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 'use strict'; 5 'use strict';
6 6
7 // If directory files changes too often, don't rescan directory more than once 7 // If directory files changes too often, don't rescan directory more than once
8 // per specified interval 8 // per specified interval
9 var SIMULTANEOUS_RESCAN_INTERVAL = 1000; 9 var SIMULTANEOUS_RESCAN_INTERVAL = 1000;
10 // Used for operations that require almost instant rescan. 10 // Used for operations that require almost instant rescan.
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 this.fileListSelection_.selectedIndex = index; 1130 this.fileListSelection_.selectedIndex = index;
1131 }; 1131 };
1132 1132
1133 /** 1133 /**
1134 * Updates the roots list. 1134 * Updates the roots list.
1135 * 1135 *
1136 * @param {function()=} opt_callback Completion callback. 1136 * @param {function()=} opt_callback Completion callback.
1137 * @private 1137 * @private
1138 */ 1138 */
1139 DirectoryModel.prototype.updateRoots_ = function(opt_callback) { 1139 DirectoryModel.prototype.updateRoots_ = function(opt_callback) {
1140 metrics.startInterval('Load.Roots'); 1140 metrics.startInterval('UpdateRootsTime');
1141 DirectoryModelUtil.resolveRoots( 1141 DirectoryModelUtil.resolveRoots(
1142 this.root_, this.driveEnabled_, 1142 this.root_, this.driveEnabled_,
1143 function(rootEntries) { 1143 function(rootEntries) {
1144 metrics.recordInterval('Load.Roots'); 1144 metrics.recordInterval('UpdateRootsTime');
1145 1145
1146 var rootsList = this.rootsList_; 1146 var rootsList = this.rootsList_;
1147 rootsList.splice.apply( 1147 rootsList.splice.apply(
1148 rootsList, [0, rootsList.length].concat(rootEntries)); 1148 rootsList, [0, rootsList.length].concat(rootEntries));
1149 if (opt_callback) 1149 if (opt_callback)
1150 opt_callback(); 1150 opt_callback();
1151 }.bind(this)); 1151 }.bind(this));
1152 }; 1152 };
1153 1153
1154 /** 1154 /**
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 if (this.onSearchCompleted_) { 1398 if (this.onSearchCompleted_) {
1399 this.removeEventListener('scan-completed', this.onSearchCompleted_); 1399 this.removeEventListener('scan-completed', this.onSearchCompleted_);
1400 this.onSearchCompleted_ = null; 1400 this.onSearchCompleted_ = null;
1401 } 1401 }
1402 1402
1403 if (this.onClearSearch_) { 1403 if (this.onClearSearch_) {
1404 this.onClearSearch_(); 1404 this.onClearSearch_();
1405 this.onClearSearch_ = null; 1405 this.onClearSearch_ = null;
1406 } 1406 }
1407 }; 1407 };
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698