Index: chrome/browser/resources/file_manager/js/main.js |
diff --git a/chrome/browser/resources/file_manager/js/main.js b/chrome/browser/resources/file_manager/js/main.js |
index dffad2ae6facc1ccf64916d8931fdd55069918d7..3e0f1bfb8f6e864c72dc72323b5e88d44c961add 100644 |
--- a/chrome/browser/resources/file_manager/js/main.js |
+++ b/chrome/browser/resources/file_manager/js/main.js |
@@ -16,8 +16,12 @@ function init() { |
var rootPaths = ['Downloads', 'removable', 'archive', 'tmp']; |
function onEntriesFound(filesystem, entries) { |
+ metrics.recordTime('EnumerateRoots'); |
FileManager.initStrings(function () { |
+ metrics.startInterval('Construct'); |
fileManager = new FileManager(document.body, filesystem, entries); |
+ metrics.recordTime('Construct'); |
+ metrics.recordTime('TotalLoad'); |
// We're ready to run. Tests can monitor for this state with |
// ExtensionTestMessageListener listener("ready"); |
// ASSERT_TRUE(listener.WaitUntilSatisfied()); |
@@ -26,6 +30,7 @@ function init() { |
} |
function onFileSystemFound(filesystem) { |
+ metrics.recordTime('RequestLocalFileSystem'); |
console.log('Found filesystem: ' + filesystem.name, filesystem); |
var entries = []; |
@@ -42,6 +47,7 @@ function init() { |
} |
} |
+ metrics.startInterval('EnumerateRoots'); |
if (filesystem.name.match(/^chrome-extension_\S+:external/i)) { |
// We've been handed the local filesystem, whose root directory |
// cannot be enumerated. |
@@ -54,6 +60,7 @@ function init() { |
util.installFileErrorToString(); |
- console.log('Requesting filesystem.'); |
- chrome.fileBrowserPrivate.requestLocalFileSystem(onFileSystemFound); |
+ console.log('Requesting filesystem.'); |
+ metrics.startInterval('RequestLocalFileSystem'); |
+ chrome.fileBrowserPrivate.requestLocalFileSystem(onFileSystemFound); |
} |