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

Unified Diff: chrome/browser/resources/md_downloads/downloads.js

Issue 2592573002: MD Downloads: add first meaningful paint metrics to UMA (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/md_downloads/crisper.js ('k') | chrome/browser/resources/md_downloads/manager.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_downloads/downloads.js
diff --git a/chrome/browser/resources/md_downloads/downloads.js b/chrome/browser/resources/md_downloads/downloads.js
index bfed6d1ce0f2aae480a22c85be601b29355160b4..949e71243567256baa5724d0e69219e893ecc454 100644
--- a/chrome/browser/resources/md_downloads/downloads.js
+++ b/chrome/browser/resources/md_downloads/downloads.js
@@ -3,6 +3,13 @@
// found in the LICENSE file.
window.addEventListener('load', function() {
- downloads.Manager.onLoad();
- document.fonts.load('bold 12px Roboto');
+ downloads.Manager.onLoad().then(function() {
+ requestIdleCallback(function() {
+ chrome.send('metricsHandler:recordTime', [
+ 'Downloads.ResultsRenderedTime',
rkaplow 2016/12/20 21:53:01 extra s here - Download
Dan Beam 2016/12/20 22:02:47 Done. (dammit)
+ window.performance.now()
+ ]);
+ document.fonts.load('bold 12px Roboto');
+ });
+ });
});
« no previous file with comments | « chrome/browser/resources/md_downloads/crisper.js ('k') | chrome/browser/resources/md_downloads/manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698