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

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

Issue 892493002: Fix "choose what to sync" in the webview signin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: now with moar regex Created 5 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6492781c36c103aac1675b5e131f054451d7a216..b2f3b27cba4ce86eb9dde85789563e2058e69e31 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -22,6 +22,7 @@ cr.define('cr.login', function() {
var SIGN_IN_HEADER = 'google-accounts-signin';
var EMBEDDED_FORM_HEADER = 'google-accounts-embedded';
var SAML_HEADER = 'google-accounts-saml';
+ var LOCATION_HEADER = 'location';
var SERVICE_ID = 'chromeoslogin';
/**
@@ -264,6 +265,11 @@ cr.define('cr.login', function() {
this.sessionIndex_ = signinDetails['sessionindex'];
} else if (headerName == SAML_HEADER) {
this.authFlow_ = AuthFlow.SAML;
+ } else if (headerName == LOCATION_HEADER) {
+ // If the "choose what to sync" checkbox was clicked, then the continue
+ // URL will contain a source=3 field.
+ var location = decodeURIComponent(header.value);
+ this.chooseWhatToSync_ = !!location.match(/(\?|&)source=3($|&)/);
}
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698