| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 // since it will be destroyed before the callback runs. | 683 // since it will be destroyed before the callback runs. |
| 684 ProfileManager* manager = g_browser_process->profile_manager(); | 684 ProfileManager* manager = g_browser_process->profile_manager(); |
| 685 base::FilePath path = profiles::GetPathOfProfileWithEmail(manager, email); | 685 base::FilePath path = profiles::GetPathOfProfileWithEmail(manager, email); |
| 686 if (!path.empty()) { | 686 if (!path.empty()) { |
| 687 FinishCompleteLoginParams params(nullptr, partition, current_url, path, | 687 FinishCompleteLoginParams params(nullptr, partition, current_url, path, |
| 688 confirm_untrusted_signin_, email, | 688 confirm_untrusted_signin_, email, |
| 689 gaia_id, password, session_index, | 689 gaia_id, password, session_index, |
| 690 auth_code, choose_what_to_sync); | 690 auth_code, choose_what_to_sync); |
| 691 ProfileManager::CreateCallback callback = base::Bind( | 691 ProfileManager::CreateCallback callback = base::Bind( |
| 692 &InlineLoginHandlerImpl::FinishCompleteLogin, params); | 692 &InlineLoginHandlerImpl::FinishCompleteLogin, params); |
| 693 profiles::SwitchToProfile(path, chrome::GetActiveDesktop(), true, | 693 profiles::SwitchToProfile(path, true, callback, |
| 694 callback, ProfileMetrics::SWITCH_PROFILE_UNLOCK); | 694 ProfileMetrics::SWITCH_PROFILE_UNLOCK); |
| 695 } | 695 } |
| 696 } else { | 696 } else { |
| 697 FinishCompleteLogin( | 697 FinishCompleteLogin( |
| 698 FinishCompleteLoginParams(this, partition, current_url, | 698 FinishCompleteLoginParams(this, partition, current_url, |
| 699 base::FilePath(), confirm_untrusted_signin_, | 699 base::FilePath(), confirm_untrusted_signin_, |
| 700 email, gaia_id, password, session_index, | 700 email, gaia_id, password, session_index, |
| 701 auth_code, choose_what_to_sync), | 701 auth_code, choose_what_to_sync), |
| 702 profile, | 702 profile, |
| 703 Profile::CREATE_STATUS_CREATED); | 703 Profile::CREATE_STATUS_CREATED); |
| 704 } | 704 } |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 } | 905 } |
| 906 | 906 |
| 907 if (show_account_management) { | 907 if (show_account_management) { |
| 908 browser->window()->ShowAvatarBubbleFromAvatarButton( | 908 browser->window()->ShowAvatarBubbleFromAvatarButton( |
| 909 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, | 909 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, |
| 910 signin::ManageAccountsParams(), | 910 signin::ManageAccountsParams(), |
| 911 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); | 911 signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN); |
| 912 } | 912 } |
| 913 } | 913 } |
| 914 } | 914 } |
| OLD | NEW |