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 8b9b30d1291f816ec87487be2d92fc4592226da3..bb349f3bde5d2435a34a4a8878e5ed9e7f0aa1a6 100644 |
--- a/chrome/browser/resources/gaia_auth/main.js |
+++ b/chrome/browser/resources/gaia_auth/main.js |
@@ -94,16 +94,7 @@ Authenticator.prototype = { |
/** Callback when all loads in the gaia webview is complete. */ |
onWebviewLoadstop_: function(gaiaFrame) { |
- // Report the current state to the parent which will then update the |
- // browser history so that later it could respond properly to back/forward. |
- var msg = { |
- 'method': 'reportState', |
- 'src': gaiaFrame.src |
- }; |
- window.parent.postMessage(msg, this.parentPage_); |
- |
- if (gaiaFrame.src.lastIndexOf( |
- this.continueUrlWithoutParams_, 0) == 0) { |
+ if (gaiaFrame.src.lastIndexOf(this.continueUrlWithoutParams_, 0) == 0) { |
// Detect when login is finished by the load stop event of the continue |
// URL. Cannot reuse the login complete flow in success.html, because |
// webview does not support extension pages yet. |
@@ -116,9 +107,19 @@ Authenticator.prototype = { |
'skipForNow': skipForNow |
}; |
window.parent.postMessage(msg, this.parentPage_); |
+ // Do no report state to the parent for the continue URL, since it is a |
+ // blank page. |
return; |
} |
+ // Report the current state to the parent which will then update the |
+ // browser history so that later it could respond properly to back/forward. |
+ var msg = { |
+ 'method': 'reportState', |
+ 'src': gaiaFrame.src |
+ }; |
+ window.parent.postMessage(msg, this.parentPage_); |
+ |
if (gaiaFrame.src.lastIndexOf(this.gaiaUrl_, 0) == 0) { |
gaiaFrame.executeScript({file: 'inline_injected.js'}, function() { |
// Send an initial message to gaia so that it has an JavaScript |