Commit 0133166b authored by Maksim Ivanov's avatar Maksim Ivanov Committed by Commit Bot

Chrome OS OOBE: Rename GaiaAuthHost to Authenticator

Remove the "GaiaAuthHost" definition, which was an alias to the
"Authenticator" class. This removal completes the TODO from 2014,
since the old iframe-based authentication has been removed from the
code, and only the webview-based authentication exists.

Bug: 470893
Test: existing tests
Change-Id: I4e174598755799e1416dbcd764ef7c83965a20e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1605919Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658790}
parent cf4f2dd4
......@@ -202,7 +202,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
decorate: function() {
this.navigation_ = $('gaia-navigation');
this.gaiaAuthHost_ = new cr.login.GaiaAuthHost($('signin-frame'));
this.gaiaAuthHost_ = new cr.login.Authenticator($('signin-frame'));
this.gaiaAuthHost_.addEventListener(
'ready', this.onAuthReady_.bind(this));
......@@ -334,7 +334,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
this.gaiaAuthParams_.doSamlRedirect = doSamlRedirect;
this.gaiaAuthHost_.load(
cr.login.GaiaAuthHost.AuthMode.DEFAULT, this.gaiaAuthParams_);
cr.login.Authenticator.AuthMode.DEFAULT, this.gaiaAuthParams_);
},
/**
......@@ -705,8 +705,8 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
Oobe.getInstance().updateScreenSize(this);
var params = {};
for (var i in cr.login.GaiaAuthHost.SUPPORTED_PARAMS) {
var name = cr.login.GaiaAuthHost.SUPPORTED_PARAMS[i];
for (var i in cr.login.Authenticator.SUPPORTED_PARAMS) {
var name = cr.login.Authenticator.SUPPORTED_PARAMS[i];
if (data[name])
params[name] = data[name];
}
......@@ -773,7 +773,8 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
* Whether the current auth flow is SAML.
*/
isSAML: function() {
return this.gaiaAuthHost_.authFlow == cr.login.GaiaAuthHost.AuthFlow.SAML;
return this.gaiaAuthHost_.authFlow ==
cr.login.Authenticator.AuthFlow.SAML;
},
/**
......
......@@ -8,9 +8,8 @@
/**
* @fileoverview An UI component to authenciate to Chrome. The component hosts
* IdP web pages in a webview. A client who is interested in monitoring
* authentication events should pass a listener object of type
* cr.login.GaiaAuthHost.Listener as defined in this file. After initialization,
* call {@code load} to start the authentication flow.
* authentication events should subscribe itself via addEventListener(). After
* initialization, call {@code load} to start the authentication flow.
*
* See go/cros-auth-design for details on Google API.
*/
......@@ -1022,9 +1021,6 @@ cr.define('cr.login', function() {
Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS;
return {
// TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old
// iframe-based flow is deprecated.
GaiaAuthHost: Authenticator,
Authenticator: Authenticator
};
});
......@@ -11,7 +11,7 @@ cr.define('inline.login', function() {
/**
* The auth extension host instance.
* @type {cr.login.GaiaAuthHost}
* @type {cr.login.Authenticator}
*/
let authExtHost;
......@@ -65,7 +65,7 @@ cr.define('inline.login', function() {
*/
function initialize() {
$('navigation-button').addEventListener('click', navigationButtonClicked);
authExtHost = new cr.login.GaiaAuthHost('signin-frame');
authExtHost = new cr.login.Authenticator('signin-frame');
authExtHost.addEventListener('dropLink', onDropLink);
authExtHost.addEventListener('ready', onAuthReady);
authExtHost.addEventListener('newWindow', onNewWindow);
......@@ -86,7 +86,7 @@ cr.define('inline.login', function() {
$('contents')
.classList.toggle(
'loading',
data.authMode != cr.login.GaiaAuthHost.AuthMode.DESKTOP ||
data.authMode != cr.login.Authenticator.AuthMode.DESKTOP ||
data.constrained == '1');
isLoginPrimaryAccount = data.isLoginPrimaryAccount;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment