OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/chromeos/login/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 gaia::SanitizeEmail(account_id.GetUserEmail())); | 1152 gaia::SanitizeEmail(account_id.GetUserEmail())); |
1153 chromeos::PinStorage* pin_storage = | 1153 chromeos::PinStorage* pin_storage = |
1154 chromeos::PinStorageFactory::GetForAccountId(account_id); | 1154 chromeos::PinStorageFactory::GetForAccountId(account_id); |
1155 // If pin storage is unavailable, authenticated by PIN must be false. | 1155 // If pin storage is unavailable, authenticated by PIN must be false. |
1156 DCHECK(!pin_storage || pin_storage->IsPinAuthenticationAvailable() || | 1156 DCHECK(!pin_storage || pin_storage->IsPinAuthenticationAvailable() || |
1157 !authenticated_by_pin); | 1157 !authenticated_by_pin); |
1158 | 1158 |
1159 UserContext user_context(account_id); | 1159 UserContext user_context(account_id); |
1160 user_context.SetKey(Key(password)); | 1160 user_context.SetKey(Key(password)); |
1161 user_context.SetIsUsingPin(authenticated_by_pin); | 1161 user_context.SetIsUsingPin(authenticated_by_pin); |
| 1162 if (account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY) |
| 1163 user_context.SetUserType(user_manager::USER_TYPE_ACTIVE_DIRECTORY); |
1162 delegate_->Login(user_context, SigninSpecifics()); | 1164 delegate_->Login(user_context, SigninSpecifics()); |
1163 | 1165 |
1164 HidePinKeyboardIfNeeded(account_id); | 1166 HidePinKeyboardIfNeeded(account_id); |
1165 } | 1167 } |
1166 | 1168 |
1167 void SigninScreenHandler::HandleLaunchIncognito() { | 1169 void SigninScreenHandler::HandleLaunchIncognito() { |
1168 UserContext context(user_manager::USER_TYPE_GUEST, EmptyAccountId()); | 1170 UserContext context(user_manager::USER_TYPE_GUEST, EmptyAccountId()); |
1169 if (delegate_) | 1171 if (delegate_) |
1170 delegate_->Login(context, SigninSpecifics()); | 1172 delegate_->Login(context, SigninSpecifics()); |
1171 } | 1173 } |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 if (focused_pod_account_id_) { | 1607 if (focused_pod_account_id_) { |
1606 std::string user_input_method = | 1608 std::string user_input_method = |
1607 GetUserLRUInputMethod(focused_pod_account_id_->GetUserEmail()); | 1609 GetUserLRUInputMethod(focused_pod_account_id_->GetUserEmail()); |
1608 EnforcePolicyInputMethods(user_input_method); | 1610 EnforcePolicyInputMethods(user_input_method); |
1609 } else { | 1611 } else { |
1610 EnforcePolicyInputMethods(std::string()); | 1612 EnforcePolicyInputMethods(std::string()); |
1611 } | 1613 } |
1612 } | 1614 } |
1613 | 1615 |
1614 } // namespace chromeos | 1616 } // namespace chromeos |
OLD | NEW |