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

Side by Side Diff: chrome/browser/resources/gaia_auth_host/gaia_auth_host.js

Issue 145073003: Indicate which authentication flow was used in UserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Speculative fix for telemetry. Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 * @fileoverview An UI component to host gaia auth extension in an iframe. 6 * @fileoverview An UI component to host gaia auth extension in an iframe.
7 * After the component binds with an iframe, call its {@code load} to start the 7 * After the component binds with an iframe, call its {@code load} to start the
8 * authentication flow. There are two events would be raised after this point: 8 * authentication flow. There are two events would be raised after this point:
9 * a 'ready' event when the authentication UI is ready to use and a 'completed' 9 * a 'ready' event when the authentication UI is ready to use and a 'completed'
10 * event when the authentication is completed successfully. If caller is 10 * event when the authentication is completed successfully. If caller is
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 if (/^complete(Login|Authentication)$|^offlineLogin$/.test(msg.method)) { 348 if (/^complete(Login|Authentication)$|^offlineLogin$/.test(msg.method)) {
349 if (!msg.email && !this.email_ && !msg.skipForNow) { 349 if (!msg.email && !this.email_ && !msg.skipForNow) {
350 var msg = {method: 'redirectToSignin'}; 350 var msg = {method: 'redirectToSignin'};
351 this.frame_.contentWindow.postMessage(msg, AUTH_URL_BASE); 351 this.frame_.contentWindow.postMessage(msg, AUTH_URL_BASE);
352 return; 352 return;
353 } 353 }
354 this.onAuthSuccess_({email: msg.email || this.email_, 354 this.onAuthSuccess_({email: msg.email || this.email_,
355 password: msg.password || this.password_, 355 password: msg.password || this.password_,
356 authCode: msg.authCode, 356 authCode: msg.authCode,
357 useOffline: msg.method == 'offlineLogin', 357 useOffline: msg.method == 'offlineLogin',
358 usingSAML: msg.usingSAML || false,
358 chooseWhatToSync: this.chooseWhatToSync_, 359 chooseWhatToSync: this.chooseWhatToSync_,
359 skipForNow: msg.skipForNow || false }); 360 skipForNow: msg.skipForNow || false });
360 return; 361 return;
361 } 362 }
362 363
363 if (msg.method == 'retrieveAuthenticatedUserEmail') { 364 if (msg.method == 'retrieveAuthenticatedUserEmail') {
364 if (this.retrieveAuthenticatedUserEmailCallback_) { 365 if (this.retrieveAuthenticatedUserEmailCallback_) {
365 this.retrieveAuthenticatedUserEmailCallback_(msg.attemptToken); 366 this.retrieveAuthenticatedUserEmailCallback_(msg.attemptToken);
366 } else { 367 } else {
367 console.error( 368 console.error(
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 437
437 GaiaAuthHost.SUPPORTED_PARAMS = SUPPORTED_PARAMS; 438 GaiaAuthHost.SUPPORTED_PARAMS = SUPPORTED_PARAMS;
438 GaiaAuthHost.LOCALIZED_STRING_PARAMS = LOCALIZED_STRING_PARAMS; 439 GaiaAuthHost.LOCALIZED_STRING_PARAMS = LOCALIZED_STRING_PARAMS;
439 GaiaAuthHost.AuthMode = AuthMode; 440 GaiaAuthHost.AuthMode = AuthMode;
440 GaiaAuthHost.AuthFlow = AuthFlow; 441 GaiaAuthHost.AuthFlow = AuthFlow;
441 442
442 return { 443 return {
443 GaiaAuthHost: GaiaAuthHost 444 GaiaAuthHost: GaiaAuthHost
444 }; 445 };
445 }); 446 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/gaia_auth/main.js ('k') | chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698