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

Unified Diff: chrome/browser/resources/gaia_auth/background.js

Issue 671183002: Revert of Inline sign in extracts gaia id from HTTP header and seeds account tracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 2 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/background.js
diff --git a/chrome/browser/resources/gaia_auth/background.js b/chrome/browser/resources/gaia_auth/background.js
index db94085fbbb3d9331429507e0933112add22d63e..ffe0b0785871f96bee7a2357e42d142266732860 100644
--- a/chrome/browser/resources/gaia_auth/background.js
+++ b/chrome/browser/resources/gaia_auth/background.js
@@ -119,10 +119,6 @@
// 'google-accounts-signin'.
email_: null,
- // Gaia Id of the newly authenticated user based on the gaia response
- // header 'google-accounts-signin'.
- gaiaId_: null,
-
// Session index of the newly authenticated user based on the gaia response
// header 'google-accounts-signin'.
sessionIndex_: null,
@@ -208,7 +204,7 @@
onCompleted: function(details) {
// Only monitors requests in the gaia frame whose parent frame ID must be
// positive.
- if (details.parentFrameId <= 0)
+ if (!this.isDesktopFlow_ || details.parentFrameId <= 0)
return;
if (details.url.lastIndexOf(backgroundBridgeManager.CONTINUE_URL_BASE, 0) ==
@@ -217,12 +213,11 @@
if (details.url.indexOf('ntp=1') >= 0)
skipForNow = true;
- // TOOD(guohui): For desktop SAML flow, show password confirmation UI.
+ // TOOD(guohui): Show password confirmation UI.
var passwords = this.onGetScrapedPasswords_();
var msg = {
'name': 'completeLogin',
'email': this.email_,
- 'gaiaId': this.gaiaId_,
'password': passwords[0],
'sessionIndex': this.sessionIndex_,
'skipForNow': skipForNow
@@ -267,7 +262,11 @@
onHeadersReceived: function(details) {
var headers = details.responseHeaders;
- if (this.gaiaUrl_ && details.url.lastIndexOf(this.gaiaUrl_) == 0) {
+ if (this.isDesktopFlow_ &&
+ this.gaiaUrl_ &&
+ details.url.lastIndexOf(this.gaiaUrl_) == 0) {
+ // TODO(xiyuan, guohui): CrOS should reuse the logic below for reading the
+ // email for SAML users and cut off the /ListAccount call.
for (var i = 0; headers && i < headers.length; ++i) {
if (headers[i].name.toLowerCase() == 'google-accounts-signin') {
var headerValues = headers[i].value.toLowerCase().split(',');
@@ -278,7 +277,6 @@
});
// Remove "" around.
this.email_ = signinDetails['email'].slice(1, -1);
- this.gaiaId_ = signinDetails['obfuscatedid'].slice(1, -1);
this.sessionIndex_ = signinDetails['sessionindex'];
break;
}
« no previous file with comments | « chrome/browser/resources/component_extension_resources.grd ('k') | chrome/browser/resources/gaia_auth/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698