| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/session/user_session_manager.h" | 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 35 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 36 #include "chrome/browser/chromeos/base/locale_util.h" | 36 #include "chrome/browser/chromeos/base/locale_util.h" |
| 37 #include "chrome/browser/chromeos/boot_times_recorder.h" | 37 #include "chrome/browser/chromeos/boot_times_recorder.h" |
| 38 #include "chrome/browser/chromeos/first_run/first_run.h" | 38 #include "chrome/browser/chromeos/first_run/first_run.h" |
| 39 #include "chrome/browser/chromeos/first_run/goodies_displayer.h" | 39 #include "chrome/browser/chromeos/first_run/goodies_displayer.h" |
| 40 #include "chrome/browser/chromeos/input_method/input_method_util.h" | 40 #include "chrome/browser/chromeos/input_method/input_method_util.h" |
| 41 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h" | 41 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h" |
| 42 #include "chrome/browser/chromeos/login/chrome_restart_request.h" | 42 #include "chrome/browser/chromeos/login/chrome_restart_request.h" |
| 43 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" | 43 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" |
| 44 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" | 44 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" |
| 45 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 45 #include "chrome/browser/chromeos/login/helper.h" | 46 #include "chrome/browser/chromeos/login/helper.h" |
| 46 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 47 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 47 #include "chrome/browser/chromeos/login/profile_auth_data.h" | 48 #include "chrome/browser/chromeos/login/profile_auth_data.h" |
| 48 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" | 49 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.h" |
| 49 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_factory
.h" | 50 #include "chrome/browser/chromeos/login/saml/saml_offline_signin_limiter_factory
.h" |
| 50 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" | 51 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager.h" |
| 51 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager_factory.h" | 52 #include "chrome/browser/chromeos/login/signin/oauth2_login_manager_factory.h" |
| 52 #include "chrome/browser/chromeos/login/signin/token_handle_fetcher.h" | 53 #include "chrome/browser/chromeos/login/signin/token_handle_fetcher.h" |
| 53 #include "chrome/browser/chromeos/login/startup_utils.h" | 54 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 54 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" | 55 #include "chrome/browser/chromeos/login/ui/input_events_blocker.h" |
| 55 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 56 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 56 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | |
| 57 #include "chrome/browser/chromeos/login/user_flow.h" | 57 #include "chrome/browser/chromeos/login/user_flow.h" |
| 58 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 58 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
| 59 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" | 59 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" |
| 60 #include "chrome/browser/chromeos/login/wizard_controller.h" | 60 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 61 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 61 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 62 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 62 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 63 #include "chrome/browser/chromeos/settings/cros_settings.h" | 63 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 64 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h" | 64 #include "chrome/browser/component_updater/ev_whitelist_component_installer.h" |
| 65 #include "chrome/browser/first_run/first_run.h" | 65 #include "chrome/browser/first_run/first_run.h" |
| 66 #include "chrome/browser/google/google_brand_chromeos.h" | 66 #include "chrome/browser/google/google_brand_chromeos.h" |
| (...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1174 // like OnProfileCreated() may be getting called before | 1174 // like OnProfileCreated() may be getting called before |
| 1175 // UserSessionManager::PrepareProfile() has set |delegate_| when Chrome is | 1175 // UserSessionManager::PrepareProfile() has set |delegate_| when Chrome is |
| 1176 // killed during shutdown in tests -- see http://crosbug.com/18269. Replace | 1176 // killed during shutdown in tests -- see http://crosbug.com/18269. Replace |
| 1177 // this 'if' statement with a CHECK(delegate_) once the underlying issue is | 1177 // this 'if' statement with a CHECK(delegate_) once the underlying issue is |
| 1178 // resolved. | 1178 // resolved. |
| 1179 if (delegate_) | 1179 if (delegate_) |
| 1180 delegate_->OnProfilePrepared(profile, browser_launched); | 1180 delegate_->OnProfilePrepared(profile, browser_launched); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 void UserSessionManager::ActivateWizard(const std::string& screen_name) { | 1183 void UserSessionManager::ActivateWizard(const std::string& screen_name) { |
| 1184 LoginDisplayHost* host = LoginDisplayHostImpl::default_host(); | 1184 LoginDisplayHost* host = LoginDisplayHost::default_host(); |
| 1185 CHECK(host); | 1185 CHECK(host); |
| 1186 host->StartWizard(screen_name); | 1186 host->StartWizard(screen_name); |
| 1187 } | 1187 } |
| 1188 | 1188 |
| 1189 void UserSessionManager::InitializeStartUrls() const { | 1189 void UserSessionManager::InitializeStartUrls() const { |
| 1190 // Child account status should be known by the time of this call. | 1190 // Child account status should be known by the time of this call. |
| 1191 std::vector<std::string> start_urls; | 1191 std::vector<std::string> start_urls; |
| 1192 | 1192 |
| 1193 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); | 1193 user_manager::UserManager* user_manager = user_manager::UserManager::Get(); |
| 1194 | 1194 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 // Mark the device as registered., i.e. the second part of OOBE as | 1264 // Mark the device as registered., i.e. the second part of OOBE as |
| 1265 // completed. | 1265 // completed. |
| 1266 if (!StartupUtils::IsDeviceRegistered()) | 1266 if (!StartupUtils::IsDeviceRegistered()) |
| 1267 StartupUtils::MarkDeviceRegistered(base::Closure()); | 1267 StartupUtils::MarkDeviceRegistered(base::Closure()); |
| 1268 | 1268 |
| 1269 ActivateWizard(WizardController::kTermsOfServiceScreenName); | 1269 ActivateWizard(WizardController::kTermsOfServiceScreenName); |
| 1270 return false; | 1270 return false; |
| 1271 } | 1271 } |
| 1272 } | 1272 } |
| 1273 | 1273 |
| 1274 DoBrowserLaunch(profile, LoginDisplayHostImpl::default_host()); | 1274 DoBrowserLaunch(profile, LoginDisplayHost::default_host()); |
| 1275 return true; | 1275 return true; |
| 1276 } | 1276 } |
| 1277 | 1277 |
| 1278 void UserSessionManager::InitSessionRestoreStrategy() { | 1278 void UserSessionManager::InitSessionRestoreStrategy() { |
| 1279 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 1279 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 1280 bool in_app_mode = chrome::IsRunningInForcedAppMode(); | 1280 bool in_app_mode = chrome::IsRunningInForcedAppMode(); |
| 1281 | 1281 |
| 1282 // Are we in kiosk app mode? | 1282 // Are we in kiosk app mode? |
| 1283 if (in_app_mode) { | 1283 if (in_app_mode) { |
| 1284 if (command_line->HasSwitch(::switches::kAppModeOAuth2Token)) { | 1284 if (command_line->HasSwitch(::switches::kAppModeOAuth2Token)) { |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1789 token_handle_util_.reset(); | 1789 token_handle_util_.reset(); |
| 1790 first_run::GoodiesDisplayer::Delete(); | 1790 first_run::GoodiesDisplayer::Delete(); |
| 1791 } | 1791 } |
| 1792 | 1792 |
| 1793 void UserSessionManager::CreateTokenUtilIfMissing() { | 1793 void UserSessionManager::CreateTokenUtilIfMissing() { |
| 1794 if (!token_handle_util_.get()) | 1794 if (!token_handle_util_.get()) |
| 1795 token_handle_util_.reset(new TokenHandleUtil()); | 1795 token_handle_util_.reset(new TokenHandleUtil()); |
| 1796 } | 1796 } |
| 1797 | 1797 |
| 1798 } // namespace chromeos | 1798 } // namespace chromeos |
| OLD | NEW |