| 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" |
| 11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 16 #include "base/metrics/histogram_macros.h" | 16 #include "base/metrics/histogram_macros.h" |
| 17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 19 #include "base/values.h" | 19 #include "base/values.h" |
| 20 #include "base/version.h" | 20 #include "base/version.h" |
| 21 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
| 22 #include "chrome/browser/browser_process_platform_part.h" | 22 #include "chrome/browser/browser_process_platform_part.h" |
| 23 #include "chrome/browser/chrome_notification_types.h" | 23 #include "chrome/browser/chrome_notification_types.h" |
| 24 #include "chrome/browser/chromeos/boot_times_recorder.h" | 24 #include "chrome/browser/chromeos/boot_times_recorder.h" |
| 25 #include "chrome/browser/chromeos/customization/customization_document.h" | 25 #include "chrome/browser/chromeos/customization/customization_document.h" |
| 26 #include "chrome/browser/chromeos/login/arc_kiosk_controller.h" |
| 26 #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h" | 27 #include "chrome/browser/chromeos/login/auth/chrome_login_performer.h" |
| 27 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_context_initi
alizer.h" | 28 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_context_initi
alizer.h" |
| 28 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_flow.h" | 29 #include "chrome/browser/chromeos/login/easy_unlock/bootstrap_user_flow.h" |
| 29 #include "chrome/browser/chromeos/login/helper.h" | 30 #include "chrome/browser/chromeos/login/helper.h" |
| 30 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 31 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 31 #include "chrome/browser/chromeos/login/signin/oauth2_token_initializer.h" | 32 #include "chrome/browser/chromeos/login/signin/oauth2_token_initializer.h" |
| 32 #include "chrome/browser/chromeos/login/signin_specifics.h" | 33 #include "chrome/browser/chromeos/login/signin_specifics.h" |
| 33 #include "chrome/browser/chromeos/login/startup_utils.h" | 34 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 34 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 35 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 35 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" | 36 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 LoginAsPublicSessionInternal(new_user_context); | 939 LoginAsPublicSessionInternal(new_user_context); |
| 939 } | 940 } |
| 940 | 941 |
| 941 void ExistingUserController::LoginAsKioskApp(const std::string& app_id, | 942 void ExistingUserController::LoginAsKioskApp(const std::string& app_id, |
| 942 bool diagnostic_mode) { | 943 bool diagnostic_mode) { |
| 943 const bool auto_start = false; | 944 const bool auto_start = false; |
| 944 host_->StartAppLaunch(app_id, diagnostic_mode, auto_start); | 945 host_->StartAppLaunch(app_id, diagnostic_mode, auto_start); |
| 945 } | 946 } |
| 946 | 947 |
| 947 void ExistingUserController::LoginAsArcKioskApp(const AccountId& account_id) { | 948 void ExistingUserController::LoginAsArcKioskApp(const AccountId& account_id) { |
| 948 login_performer_.reset(nullptr); | 949 host_->StartArcKiosk(account_id); |
| 949 login_performer_.reset(new ChromeLoginPerformer(this)); | |
| 950 login_performer_->LoginAsArcKioskAccount(account_id); | |
| 951 } | 950 } |
| 952 | 951 |
| 953 void ExistingUserController::ConfigureAutoLogin() { | 952 void ExistingUserController::ConfigureAutoLogin() { |
| 954 std::string auto_login_account_id; | 953 std::string auto_login_account_id; |
| 955 cros_settings_->GetString(kAccountsPrefDeviceLocalAccountAutoLoginId, | 954 cros_settings_->GetString(kAccountsPrefDeviceLocalAccountAutoLoginId, |
| 956 &auto_login_account_id); | 955 &auto_login_account_id); |
| 957 const std::vector<policy::DeviceLocalAccount> device_local_accounts = | 956 const std::vector<policy::DeviceLocalAccount> device_local_accounts = |
| 958 policy::GetDeviceLocalAccounts(cros_settings_); | 957 policy::GetDeviceLocalAccounts(cros_settings_); |
| 959 | 958 |
| 960 public_session_auto_login_account_id_ = EmptyAccountId(); | 959 public_session_auto_login_account_id_ = EmptyAccountId(); |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 } | 1342 } |
| 1344 | 1343 |
| 1345 // Otherwise, show the unrecoverable cryptohome error UI and ask user's | 1344 // Otherwise, show the unrecoverable cryptohome error UI and ask user's |
| 1346 // permission to collect a feedback. | 1345 // permission to collect a feedback. |
| 1347 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_CRYPTOHOME_FAILURE); | 1346 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_CRYPTOHOME_FAILURE); |
| 1348 VLOG(1) << "Show unrecoverable cryptohome error dialog."; | 1347 VLOG(1) << "Show unrecoverable cryptohome error dialog."; |
| 1349 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); | 1348 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); |
| 1350 } | 1349 } |
| 1351 | 1350 |
| 1352 } // namespace chromeos | 1351 } // namespace chromeos |
| OLD | NEW |