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

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

Issue 118033003: Do not update url of Chrome signin page for the inital and continue page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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
« no previous file with comments | « no previous file | chrome/browser/resources/gaia_auth_host/gaia_auth_host.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/browser/resources/gaia_auth_host/gaia_auth_host.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698