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 <memory> | 7 #include <memory> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 // Login can continue immediately. | 968 // Login can continue immediately. |
969 LoginAsPublicSessionInternal(new_user_context); | 969 LoginAsPublicSessionInternal(new_user_context); |
970 } | 970 } |
971 | 971 |
972 void ExistingUserController::LoginAsKioskApp(const std::string& app_id, | 972 void ExistingUserController::LoginAsKioskApp(const std::string& app_id, |
973 bool diagnostic_mode) { | 973 bool diagnostic_mode) { |
974 const bool auto_start = false; | 974 const bool auto_start = false; |
975 host_->StartAppLaunch(app_id, diagnostic_mode, auto_start); | 975 host_->StartAppLaunch(app_id, diagnostic_mode, auto_start); |
976 } | 976 } |
977 | 977 |
978 void ExistingUserController::LoginAsArcKioskApp(const AccountId& account_id) { | 978 void ExistingUserController::LoginAsArcKioskApp(const AccountId& account_id, |
979 host_->StartArcKiosk(account_id); | 979 bool is_auto_launch) { |
| 980 host_->StartArcKiosk(account_id, is_auto_launch); |
980 } | 981 } |
981 | 982 |
982 void ExistingUserController::ConfigureAutoLogin() { | 983 void ExistingUserController::ConfigureAutoLogin() { |
983 std::string auto_login_account_id; | 984 std::string auto_login_account_id; |
984 cros_settings_->GetString(kAccountsPrefDeviceLocalAccountAutoLoginId, | 985 cros_settings_->GetString(kAccountsPrefDeviceLocalAccountAutoLoginId, |
985 &auto_login_account_id); | 986 &auto_login_account_id); |
986 const std::vector<policy::DeviceLocalAccount> device_local_accounts = | 987 const std::vector<policy::DeviceLocalAccount> device_local_accounts = |
987 policy::GetDeviceLocalAccounts(cros_settings_); | 988 policy::GetDeviceLocalAccounts(cros_settings_); |
988 | 989 |
989 public_session_auto_login_account_id_ = EmptyAccountId(); | 990 public_session_auto_login_account_id_ = EmptyAccountId(); |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 return; | 1310 return; |
1310 } | 1311 } |
1311 | 1312 |
1312 if (user_context.GetUserType() == user_manager::USER_TYPE_KIOSK_APP) { | 1313 if (user_context.GetUserType() == user_manager::USER_TYPE_KIOSK_APP) { |
1313 LoginAsKioskApp(user_context.GetAccountId().GetUserEmail(), | 1314 LoginAsKioskApp(user_context.GetAccountId().GetUserEmail(), |
1314 specifics.kiosk_diagnostic_mode); | 1315 specifics.kiosk_diagnostic_mode); |
1315 return; | 1316 return; |
1316 } | 1317 } |
1317 | 1318 |
1318 if (user_context.GetUserType() == user_manager::USER_TYPE_ARC_KIOSK_APP) { | 1319 if (user_context.GetUserType() == user_manager::USER_TYPE_ARC_KIOSK_APP) { |
1319 LoginAsArcKioskApp(user_context.GetAccountId()); | 1320 LoginAsArcKioskApp(user_context.GetAccountId(), specifics.is_auto_login); |
1320 return; | 1321 return; |
1321 } | 1322 } |
1322 | 1323 |
1323 // Regular user or supervised user login. | 1324 // Regular user or supervised user login. |
1324 | 1325 |
1325 if (!user_context.HasCredentials()) { | 1326 if (!user_context.HasCredentials()) { |
1326 // If credentials are missing, refuse to log in. | 1327 // If credentials are missing, refuse to log in. |
1327 | 1328 |
1328 // Reenable clicking on other windows and status area. | 1329 // Reenable clicking on other windows and status area. |
1329 login_display_->SetUIEnabled(true); | 1330 login_display_->SetUIEnabled(true); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1385 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); | 1386 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); |
1386 } | 1387 } |
1387 | 1388 |
1388 void ExistingUserController::ClearRecordedNames() { | 1389 void ExistingUserController::ClearRecordedNames() { |
1389 display_email_.clear(); | 1390 display_email_.clear(); |
1390 display_name_.clear(); | 1391 display_name_.clear(); |
1391 given_name_.clear(); | 1392 given_name_.clear(); |
1392 } | 1393 } |
1393 | 1394 |
1394 } // namespace chromeos | 1395 } // namespace chromeos |
OLD | NEW |