blob: 6bad17b2e002583c7ecf9142212f7c7c52d86d8d [file] [log] [blame]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function loadDownloads() {
return HTMLImports.whenReady(function() {
downloads.Manager.onLoad().then(function() {
requestIdleCallback(function() {
chrome.send(
'metricsHandler:recordTime',
['Download.ResultsRenderedTime', window.performance.now()]);
document.fonts.load('bold 12px Roboto');
});
});
});
}
if (document.readyState === 'complete') {
loadDownloads();
} else {
window.addEventListener('load', loadDownloads);
}