| 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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 LoginAsPublicSessionInternal(new_user_context); | 916 LoginAsPublicSessionInternal(new_user_context); |
| 916 } | 917 } |
| 917 | 918 |
| 918 void ExistingUserController::LoginAsKioskApp(const std::string& app_id, | 919 void ExistingUserController::LoginAsKioskApp(const std::string& app_id, |
| 919 bool diagnostic_mode) { | 920 bool diagnostic_mode) { |
| 920 const bool auto_start = false; | 921 const bool auto_start = false; |
| 921 host_->StartAppLaunch(app_id, diagnostic_mode, auto_start); | 922 host_->StartAppLaunch(app_id, diagnostic_mode, auto_start); |
| 922 } | 923 } |
| 923 | 924 |
| 924 void ExistingUserController::LoginAsArcKioskApp(const AccountId& account_id) { | 925 void ExistingUserController::LoginAsArcKioskApp(const AccountId& account_id) { |
| 925 login_performer_.reset(nullptr); | 926 host_->StartArcKiosk(account_id); |
| 926 login_performer_.reset(new ChromeLoginPerformer(this)); | |
| 927 login_performer_->LoginAsArcKioskAccount(account_id); | |
| 928 } | 927 } |
| 929 | 928 |
| 930 void ExistingUserController::ConfigureAutoLogin() { | 929 void ExistingUserController::ConfigureAutoLogin() { |
| 931 std::string auto_login_account_id; | 930 std::string auto_login_account_id; |
| 932 cros_settings_->GetString(kAccountsPrefDeviceLocalAccountAutoLoginId, | 931 cros_settings_->GetString(kAccountsPrefDeviceLocalAccountAutoLoginId, |
| 933 &auto_login_account_id); | 932 &auto_login_account_id); |
| 934 const std::vector<policy::DeviceLocalAccount> device_local_accounts = | 933 const std::vector<policy::DeviceLocalAccount> device_local_accounts = |
| 935 policy::GetDeviceLocalAccounts(cros_settings_); | 934 policy::GetDeviceLocalAccounts(cros_settings_); |
| 936 | 935 |
| 937 public_session_auto_login_account_id_ = EmptyAccountId(); | 936 public_session_auto_login_account_id_ = EmptyAccountId(); |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 } | 1319 } |
| 1321 | 1320 |
| 1322 // Otherwise, show the unrecoverable cryptohome error UI and ask user's | 1321 // Otherwise, show the unrecoverable cryptohome error UI and ask user's |
| 1323 // permission to collect a feedback. | 1322 // permission to collect a feedback. |
| 1324 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_CRYPTOHOME_FAILURE); | 1323 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_CRYPTOHOME_FAILURE); |
| 1325 VLOG(1) << "Show unrecoverable cryptohome error dialog."; | 1324 VLOG(1) << "Show unrecoverable cryptohome error dialog."; |
| 1326 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); | 1325 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); |
| 1327 } | 1326 } |
| 1328 | 1327 |
| 1329 } // namespace chromeos | 1328 } // namespace chromeos |
| OLD | NEW |