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

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

Issue 418043002: Add test for showing confirmation dialog for unsecure signin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added comments Created 6 years, 5 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 this.isSAMLFlow_ = false; 421 this.isSAMLFlow_ = false;
422 if (this.supportChannel_) 422 if (this.supportChannel_)
423 this.supportChannel_.send({name: 'resetAuth'}); 423 this.supportChannel_.send({name: 'resetAuth'});
424 } else if (msg.method == 'setAuthenticatedUserEmail' && 424 } else if (msg.method == 'setAuthenticatedUserEmail' &&
425 this.isParentMessage_(e)) { 425 this.isParentMessage_(e)) {
426 if (this.attemptToken_ == msg.attemptToken) { 426 if (this.attemptToken_ == msg.attemptToken) {
427 this.email_ = msg.email; 427 this.email_ = msg.email;
428 this.maybeCompleteSAMLLogin_(); 428 this.maybeCompleteSAMLLogin_();
429 } 429 }
430 } else if (msg.method == 'confirmLogin' && this.isInternalMessage_(e)) { 430 } else if (msg.method == 'confirmLogin' && this.isInternalMessage_(e)) {
431 // In the desktop mode, Chrome needs to wait for extra info such as
432 // session index from the background JS.
433 if (this.desktopMode_)
434 return;
435
431 if (this.attemptToken_ == msg.attemptToken) 436 if (this.attemptToken_ == msg.attemptToken)
432 this.onConfirmLogin_(); 437 this.onConfirmLogin_();
433 else 438 else
434 console.error('Authenticator.onMessage: unexpected attemptToken!?'); 439 console.error('Authenticator.onMessage: unexpected attemptToken!?');
435 } else if (msg.method == 'verifyConfirmedPassword' && 440 } else if (msg.method == 'verifyConfirmedPassword' &&
436 this.isParentMessage_(e)) { 441 this.isParentMessage_(e)) {
437 this.onVerifyConfirmedPassword_(msg.password); 442 this.onVerifyConfirmedPassword_(msg.password);
438 } else if (msg.method == 'redirectToSignin' && 443 } else if (msg.method == 'redirectToSignin' &&
439 this.isParentMessage_(e)) { 444 this.isParentMessage_(e)) {
440 $('gaia-frame').src = this.constructInitialFrameUrl_(); 445 $('gaia-frame').src = this.constructInitialFrameUrl_();
441 } else { 446 } else {
442 console.error('Authenticator.onMessage: unknown message + origin!?'); 447 console.error('Authenticator.onMessage: unknown message + origin!?');
443 } 448 }
444 } 449 }
445 }; 450 };
446 451
447 Authenticator.getInstance().initialize(); 452 Authenticator.getInstance().initialize();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698