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

Unified Diff: chrome/browser/resources/gaia_auth/main.js

Issue 134733019: Add perf histogram and tests for inline signin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/gaia_auth/main.js
diff --git a/chrome/browser/resources/gaia_auth/main.js b/chrome/browser/resources/gaia_auth/main.js
index 936ea1d13f8daaf301efae5bd0cf9abb40b5f463..8efa28cc995b4f30c417e5f0fdbb0fd5bc191d1f 100644
--- a/chrome/browser/resources/gaia_auth/main.js
+++ b/chrome/browser/resources/gaia_auth/main.js
@@ -61,6 +61,7 @@ Authenticator.prototype = {
this.initialFrameUrl_ = params.frameUrl || this.constructInitialFrameUrl_();
this.initialFrameUrlWithoutParams_ = stripParams(this.initialFrameUrl_);
this.loaded_ = false;
+ this.load_start_ts_ = 0;
document.addEventListener('DOMContentLoaded', this.onPageLoad.bind(this));
document.addEventListener('enableSAML', this.onEnableSAML_.bind(this));
@@ -168,6 +169,8 @@ Authenticator.prototype = {
var gaiaFrame = $('gaia-frame');
gaiaFrame.partition = this.partitionId_;
gaiaFrame.src = this.initialFrameUrl_;
+ this.load_start_ts_ = Date.now();
+
if (this.inlineMode_) {
gaiaFrame.addEventListener(
'loadstop', this.onWebviewLoadstop_.bind(this, gaiaFrame));
@@ -260,7 +263,9 @@ Authenticator.prototype = {
onLoginUILoaded: function() {
var msg = {
- 'method': 'loginUILoaded'
+ 'method': 'loginUILoaded',
+ 'load_start_ts': this.load_start_ts_,
+ 'load_stop_ts': Date.now()
};
window.parent.postMessage(msg, this.parentPage_);
if (this.inlineMode_) {
« no previous file with comments | « no previous file | chrome/browser/resources/gaia_auth_host/gaia_auth_host.js » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698