OLD | NEW |
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 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 5 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 // once profile is loaded. | 582 // once profile is loaded. |
583 password_changed_ = login_performer_->password_changed(); | 583 password_changed_ = login_performer_->password_changed(); |
584 auth_mode_ = login_performer_->auth_mode(); | 584 auth_mode_ = login_performer_->auth_mode(); |
585 | 585 |
586 ChromeUserManager::Get() | 586 ChromeUserManager::Get() |
587 ->GetUserFlow(user_context.GetUserID()) | 587 ->GetUserFlow(user_context.GetUserID()) |
588 ->HandleLoginSuccess(user_context); | 588 ->HandleLoginSuccess(user_context); |
589 | 589 |
590 StopPublicSessionAutoLoginTimer(); | 590 StopPublicSessionAutoLoginTimer(); |
591 | 591 |
| 592 // Truth table of |has_auth_cookies|: |
| 593 // Regular SAML |
| 594 // /ServiceLogin T T |
| 595 // /ChromeOsEmbeddedSetup F T |
| 596 // Bootstrap experiment F N/A |
592 const bool has_auth_cookies = | 597 const bool has_auth_cookies = |
593 login_performer_->auth_mode() == LoginPerformer::AUTH_MODE_EXTENSION && | 598 login_performer_->auth_mode() == LoginPerformer::AUTH_MODE_EXTENSION && |
594 user_context.GetAuthCode().empty() && | 599 (user_context.GetAuthCode().empty() || |
| 600 user_context.GetAuthFlow() == UserContext::AUTH_FLOW_GAIA_WITH_SAML) && |
595 user_context.GetAuthFlow() != UserContext::AUTH_FLOW_EASY_BOOTSTRAP; | 601 user_context.GetAuthFlow() != UserContext::AUTH_FLOW_EASY_BOOTSTRAP; |
596 | 602 |
597 // LoginPerformer instance will delete itself in case of successful auth. | 603 // LoginPerformer instance will delete itself in case of successful auth. |
598 login_performer_->set_delegate(NULL); | 604 login_performer_->set_delegate(NULL); |
599 ignore_result(login_performer_.release()); | 605 ignore_result(login_performer_.release()); |
600 | 606 |
601 UserSessionManager::StartSessionType start_session_type = | 607 UserSessionManager::StartSessionType start_session_type = |
602 UserAddingScreen::Get()->IsRunning() | 608 UserAddingScreen::Get()->IsRunning() |
603 ? UserSessionManager::SECONDARY_USER_SESSION | 609 ? UserSessionManager::SECONDARY_USER_SESSION |
604 : UserSessionManager::PRIMARY_USER_SESSION; | 610 : UserSessionManager::PRIMARY_USER_SESSION; |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 | 1200 |
1195 // Setting a customized login user flow to perform additional initializations | 1201 // Setting a customized login user flow to perform additional initializations |
1196 // for bootstrap after the user session is started. | 1202 // for bootstrap after the user session is started. |
1197 ChromeUserManager::Get()->SetUserFlow(user_context.GetUserID(), | 1203 ChromeUserManager::Get()->SetUserFlow(user_context.GetUserID(), |
1198 new BootstrapUserFlow(user_context)); | 1204 new BootstrapUserFlow(user_context)); |
1199 | 1205 |
1200 PerformLogin(user_context, LoginPerformer::AUTH_MODE_EXTENSION); | 1206 PerformLogin(user_context, LoginPerformer::AUTH_MODE_EXTENSION); |
1201 } | 1207 } |
1202 | 1208 |
1203 } // namespace chromeos | 1209 } // namespace chromeos |
OLD | NEW |