Chromium Code Reviews| Index: chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| index 153663d12221c56eda76bad41c30cd866f583e20..aebfac271f8646afed9ca857e0a6b66af8e99893 100644 |
| --- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| +++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js |
| @@ -22,7 +22,6 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| EXTERNAL_API: [ |
| 'loadAuthExtension', |
| 'updateAuthExtension', |
| - 'setAuthenticatedUserEmail', |
| 'doReload', |
| 'onFrameError', |
| 'updateCancelButtonState' |
| @@ -94,14 +93,14 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| this.gaiaAuthHost_ = new cr.login.GaiaAuthHost($('signin-frame')); |
| this.gaiaAuthHost_.addEventListener( |
| 'ready', this.onAuthReady_.bind(this)); |
| - this.gaiaAuthHost_.retrieveAuthenticatedUserEmailCallback = |
| - this.onRetrieveAuthenticatedUserEmail_.bind(this); |
| this.gaiaAuthHost_.confirmPasswordCallback = |
| this.onAuthConfirmPassword_.bind(this); |
| this.gaiaAuthHost_.noPasswordCallback = |
| this.onAuthNoPassword_.bind(this); |
| this.gaiaAuthHost_.insecureContentBlockedCallback = |
| this.onInsecureContentBlocked_.bind(this); |
| + this.gaiaAuthHost_.showFatalAuthErrorCallback = |
| + this.showFatalAuthError.bind(this); |
| this.gaiaAuthHost_.addEventListener('authFlowChange', |
| this.onAuthFlowChange_.bind(this)); |
| @@ -338,21 +337,6 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| }, |
| /** |
| - * Sends the authenticated user's e-mail address to the auth extension. |
| - * @param {number} attemptToken The opaque token provided to |
| - * onRetrieveAuthenticatedUserEmail_. |
| - * @param {string} email The authenticated user's e-mail address. |
| - */ |
| - setAuthenticatedUserEmail: function(attemptToken, email) { |
| - if (!email) { |
| - this.showFatalAuthError( |
| - loadTimeData.getString('fatalErrorMessageNoEmail')); |
| - } else { |
| - this.gaiaAuthHost_.setAuthenticatedUserEmail(attemptToken, email); |
| - } |
| - }, |
| - |
| - /** |
| * Updates [Cancel] button state. Allow cancellation of screen only when |
| * user pods can be displayed. |
| */ |
| @@ -413,27 +397,6 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| }, |
| /** |
| - * Invoked when the user has successfully authenticated via SAML and the |
| - * auth host needs to retrieve the user's e-mail. |
| - * @param {number} attemptToken Opaque token to be passed to |
| - * setAuthenticatedUserEmail along with the e-mail address. |
| - * @param {boolean} apiUsed Whether the principals API was used during |
| - * authentication. |
| - * @private |
| - */ |
| - onRetrieveAuthenticatedUserEmail_: function(attemptToken, apiUsed) { |
| - if (apiUsed) { |
| - // If the principals API was used, report this to the C++ backend so |
| - // that statistics can be kept. If password scraping was used instead, |
| - // there is no need to inform the C++ backend at this point: Either |
| - // onAuthNoPassword_ or onAuthConfirmPassword_ will be called in a |
| - // moment, both of which imply to the backend that the API was not used. |
| - chrome.send('usingSAMLAPI'); |
|
bartfab (slow)
2014/10/17 09:54:55
We still need to inform the C++ backend that the A
Roger Tawa OOO till Jul 10th
2014/10/20 16:04:00
Done.
|
| - } |
| - chrome.send('retrieveAuthenticatedUserEmail', [attemptToken]); |
| - }, |
| - |
| - /** |
| * Invoked when the user has successfully authenticated via SAML, the |
| * principals API was not used and the auth host needs the user to confirm |
| * the scraped password. |
| @@ -511,15 +474,19 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { |
| if (credentials.useOffline) { |
| this.email = credentials.email; |
| chrome.send('authenticateUser', |
| - [credentials.email, credentials.password]); |
| + [credentials.gaiaId, |
| + credentials.email, |
| + credentials.password]); |
| } else if (credentials.authCode) { |
| chrome.send('completeAuthentication', |
| - [credentials.email, |
| + [credentials.gaiaId, |
| + credentials.email, |
| credentials.password, |
| credentials.authCode]); |
| } else { |
| chrome.send('completeLogin', |
| - [credentials.email, |
| + [credentials.gaiaId, |
| + credentials.email, |
| credentials.password, |
| credentials.usingSAML]); |
| } |