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

Unified Diff: chrome/browser/resources/gaia_auth_host/authenticator.js

Issue 1988113004: Clear the login webview when SAML flow is canceled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reset SAML webview with 'about:blank'. Reset when network is disconnected. Created 4 years, 7 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_host/authenticator.js
diff --git a/chrome/browser/resources/gaia_auth_host/authenticator.js b/chrome/browser/resources/gaia_auth_host/authenticator.js
index 55a24f76def03b64ded67f09c3da9dd0b3ff65ca..a4a0b894ec60a11844b5d462636074cea4117e00 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -196,7 +196,7 @@ cr.define('cr.login', function() {
* Reinitializes authentication parameters so that a failed login attempt
* would not result in an infinite loop.
*/
- Authenticator.prototype.resetStates_ = function() {
emaxx 2016/05/23 15:00:49 Removed trailing underscore, as this method is cal
+ Authenticator.prototype.resetStates = function() {
this.isLoaded_ = false;
this.email_ = null;
this.gaiaId_ = null;
@@ -213,6 +213,7 @@ cr.define('cr.login', function() {
this.authFlow = AuthFlow.DEFAULT;
this.samlHandler_.reset();
this.videoEnabled = false;
+ this.webview_.src = 'about:blank';
achuithb 2016/05/24 23:29:27 Is it worthwhile adding a short comment here about
};
/**
@@ -222,7 +223,7 @@ cr.define('cr.login', function() {
*/
Authenticator.prototype.load = function(authMode, data) {
this.authMode = authMode;
- this.resetStates_();
+ this.resetStates();
// gaiaUrl parameter is used for testing. Once defined, it is never changed.
this.idpOrigin_ = data.gaiaUrl || IDP_ORIGIN;
this.continueUrl_ = data.continueUrl || CONTINUE_URL;
@@ -270,7 +271,7 @@ cr.define('cr.login', function() {
* Reloads the authenticator component.
*/
Authenticator.prototype.reload = function() {
- this.resetStates_();
+ this.resetStates();
this.webview_.src = this.reloadUrl_;
this.isLoaded_ = true;
};
@@ -703,7 +704,7 @@ cr.define('cr.login', function() {
gapsCookie: this.newGapsCookie_ || this.gapsCookie_ || '',
}
}));
- this.resetStates_();
+ this.resetStates();
};
/**

Powered by Google App Engine
This is Rietveld 408576698