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

Side by Side Diff: chrome/browser/resources/gaia_auth/main.js

Issue 473153002: 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: rebased Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Authenticator class wraps the communications between Gaia and its host. 6 * Authenticator class wraps the communications between Gaia and its host.
7 */ 7 */
8 function Authenticator() { 8 function Authenticator() {
9 } 9 }
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 */ 214 */
215 completeLogin_: function(opt_extraMsg) { 215 completeLogin_: function(opt_extraMsg) {
216 var msg = { 216 var msg = {
217 'method': 'completeLogin', 217 'method': 'completeLogin',
218 'email': (opt_extraMsg && opt_extraMsg.email) || this.email_, 218 'email': (opt_extraMsg && opt_extraMsg.email) || this.email_,
219 'password': (opt_extraMsg && opt_extraMsg.password) || 219 'password': (opt_extraMsg && opt_extraMsg.password) ||
220 this.passwordBytes_, 220 this.passwordBytes_,
221 'usingSAML': this.isSAMLFlow_, 221 'usingSAML': this.isSAMLFlow_,
222 'chooseWhatToSync': this.chooseWhatToSync_ || false, 222 'chooseWhatToSync': this.chooseWhatToSync_ || false,
223 'skipForNow': opt_extraMsg && opt_extraMsg.skipForNow, 223 'skipForNow': opt_extraMsg && opt_extraMsg.skipForNow,
224 'sessionIndex': opt_extraMsg && opt_extraMsg.sessionIndex 224 'sessionIndex': opt_extraMsg && opt_extraMsg.sessionIndex,
225 }; 225 'gaiaId': opt_extraMsg && opt_extraMsg.gaiaId
226 };
226 window.parent.postMessage(msg, this.parentPage_); 227 window.parent.postMessage(msg, this.parentPage_);
227 this.supportChannel_.send({name: 'resetAuth'}); 228 this.supportChannel_.send({name: 'resetAuth'});
228 }, 229 },
229 230
230 /** 231 /**
231 * Invoked when support channel is connected. 232 * Invoked when support channel is connected.
232 */ 233 */
233 initSAML_: function() { 234 initSAML_: function() {
234 this.isSAMLFlow_ = false; 235 this.isSAMLFlow_ = false;
235 236
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 } else if (msg.method == 'redirectToSignin' && 439 } else if (msg.method == 'redirectToSignin' &&
439 this.isParentMessage_(e)) { 440 this.isParentMessage_(e)) {
440 $('gaia-frame').src = this.constructInitialFrameUrl_(); 441 $('gaia-frame').src = this.constructInitialFrameUrl_();
441 } else { 442 } else {
442 console.error('Authenticator.onMessage: unknown message + origin!?'); 443 console.error('Authenticator.onMessage: unknown message + origin!?');
443 } 444 }
444 } 445 }
445 }; 446 };
446 447
447 Authenticator.getInstance().initialize(); 448 Authenticator.getInstance().initialize();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698