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

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

Issue 1344443002: Implement new password separated sign in flow for chrome desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 3 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 3b9f0038430c521ccdfe24aee1b17ed563ec4357..f61a3515cc1cebc80488d8a2660a7e36c588cedd 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -202,7 +202,7 @@ cr.define('cr.login', function() {
this.continueUrl_.substring(0, this.continueUrl_.indexOf('?')) ||
this.continueUrl_;
this.isConstrainedWindow_ = data.constrained == '1';
- this.isNewGaiaFlowChromeOS = data.isNewGaiaFlowChromeOS;
+ this.isNewGaiaFlow = data.isNewGaiaFlow;
this.useEafe_ = data.useEafe || false;
this.clientId_ = data.clientId;
this.gapsCookie_ = data.gapsCookie;
@@ -217,7 +217,7 @@ cr.define('cr.login', function() {
this.idpOrigin_.indexOf('https://') == 0;
this.needPassword = !('needPassword' in data) || data.needPassword;
- if (this.isNewGaiaFlowChromeOS) {
+ if (this.isNewGaiaFlow) {
this.webview_.contextMenus.onShow.addListener(function(e) {
e.preventDefault();
});
@@ -246,13 +246,13 @@ cr.define('cr.login', function() {
Authenticator.prototype.constructInitialFrameUrl_ = function(data) {
var path = data.gaiaPath;
- if (!path && this.isNewGaiaFlowChromeOS)
+ if (!path && this.isNewGaiaFlow)
path = EMBEDDED_SETUP_CHROMEOS_ENDPOINT;
if (!path)
path = IDP_PATH;
var url = this.idpOrigin_ + path;
- if (this.isNewGaiaFlowChromeOS) {
+ if (this.isNewGaiaFlow) {
if (data.chromeType)
url = appendParam(url, 'chrometype', data.chromeType);
if (data.clientId)
@@ -275,8 +275,13 @@ cr.define('cr.login', function() {
url = appendParam(url, 'hl', data.hl);
if (data.gaiaId)
url = appendParam(url, 'user_id', data.gaiaId);
- if (data.email)
- url = appendParam(url, 'Email', data.email);
+ if (data.email) {
+ if (data.readOnlyEmail) {
+ url = appendParam(url, 'Email', data.email);
anthonyvd 2015/09/15 18:13:47 nit: other params are all lower case, does this on
Roger Tawa OOO till Jul 10th 2015/09/16 19:27:29 Yes. This is specified by gaia. The parameter ne
+ } else {
+ url = appendParam(url, 'email_hint', data.email);
+ }
+ }
if (this.isConstrainedWindow_)
url = appendParam(url, 'source', CONSTRAINED_FLOW_SOURCE);
if (data.flow)
@@ -391,7 +396,7 @@ cr.define('cr.login', function() {
var location = decodeURIComponent(header.value);
this.chooseWhatToSync_ = !!location.match(/(\?|&)source=3($|&)/);
} else if (
- this.isNewGaiaFlowChromeOS && headerName == SET_COOKIE_HEADER) {
+ this.isNewGaiaFlow && headerName == SET_COOKIE_HEADER) {
var headerValue = header.value;
if (headerValue.indexOf(OAUTH_CODE_COOKIE + '=', 0) == 0) {
this.oauthCode_ =
@@ -438,7 +443,7 @@ cr.define('cr.login', function() {
Authenticator.prototype.onBeforeSendHeaders_ = function(details) {
// We should re-send cookie if first request was unsuccessful (i.e. no new
// GAPS cookie was received).
- if (this.isNewGaiaFlowChromeOS && this.gapsCookie_ &&
+ if (this.isNewGaiaFlow && this.gapsCookie_ &&
(!this.gapsCookieSent_ || !this.newGapsCookie_)) {
var headers = details.requestHeaders;
var found = false;
@@ -733,10 +738,8 @@ cr.define('cr.login', function() {
* @private
*/
Authenticator.prototype.onLoadCommit_ = function(e) {
- if (this.oauthCode_) {
- this.skipForNow_ = true;
+ if (this.oauthCode_)
this.maybeCompleteAuth_();
- }
};
/**

Powered by Google App Engine
This is Rietveld 408576698