| OLD | NEW |
| 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 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h" | 5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 choose_what_to_sync(choose_what_to_sync) {} | 706 choose_what_to_sync(choose_what_to_sync) {} |
| 707 | 707 |
| 708 InlineLoginHandlerImpl:: | 708 InlineLoginHandlerImpl:: |
| 709 FinishCompleteLoginParams::~FinishCompleteLoginParams() {} | 709 FinishCompleteLoginParams::~FinishCompleteLoginParams() {} |
| 710 | 710 |
| 711 // static | 711 // static |
| 712 void InlineLoginHandlerImpl::FinishCompleteLogin( | 712 void InlineLoginHandlerImpl::FinishCompleteLogin( |
| 713 const FinishCompleteLoginParams& params, | 713 const FinishCompleteLoginParams& params, |
| 714 Profile* profile, | 714 Profile* profile, |
| 715 Profile::CreateStatus status) { | 715 Profile::CreateStatus status) { |
| 716 if (params.handler && switches::UsePasswordSeparatedSigninFlow()) { |
| 717 Browser* browser = params.handler->GetDesktopBrowser(); |
| 718 if (browser) |
| 719 browser->window()->CloseModalSigninWindow(); |
| 720 } |
| 721 |
| 716 // When doing a SAML sign in, this email check may result in a false | 722 // When doing a SAML sign in, this email check may result in a false |
| 717 // positive. This happens when the user types one email address in the | 723 // positive. This happens when the user types one email address in the |
| 718 // gaia sign in page, but signs in to a different account in the SAML sign in | 724 // gaia sign in page, but signs in to a different account in the SAML sign in |
| 719 // page. | 725 // page. |
| 720 std::string default_email; | 726 std::string default_email; |
| 721 std::string validate_email; | 727 std::string validate_email; |
| 722 if (net::GetValueForKeyInQuery(params.url, "email", &default_email) && | 728 if (net::GetValueForKeyInQuery(params.url, "email", &default_email) && |
| 723 net::GetValueForKeyInQuery(params.url, "validateEmail", | 729 net::GetValueForKeyInQuery(params.url, "validateEmail", |
| 724 &validate_email) && | 730 &validate_email) && |
| 725 validate_email == "1") { | 731 validate_email == "1") { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 } | 877 } |
| 872 } | 878 } |
| 873 | 879 |
| 874 if (show_account_management) { | 880 if (show_account_management) { |
| 875 browser->window()->ShowAvatarBubbleFromAvatarButton( | 881 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 876 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, | 882 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, |
| 877 signin::ManageAccountsParams()); | 883 signin::ManageAccountsParams()); |
| 878 } | 884 } |
| 879 } | 885 } |
| 880 } | 886 } |
| OLD | NEW |