| 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/chrome_session_manager.h" | 5 #include "chrome/browser/chromeos/login/session/chrome_session_manager.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/sys_info.h" | 12 #include "base/sys_info.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/browser_process_platform_part_chromeos.h" | 14 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
| 15 #include "chrome/browser/chrome_notification_types.h" | 15 #include "chrome/browser/chrome_notification_types.h" |
| 16 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h" | 16 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h" |
| 17 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" | 17 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" |
| 18 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 18 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 19 #include "chrome/browser/chromeos/arc/arc_service_launcher.h" | 19 #include "chrome/browser/chromeos/arc/arc_service_launcher.h" |
| 20 #include "chrome/browser/chromeos/boot_times_recorder.h" | 20 #include "chrome/browser/chromeos/boot_times_recorder.h" |
| 21 #include "chrome/browser/chromeos/lock_screen_apps/state_controller.h" |
| 21 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" | 22 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" |
| 22 #include "chrome/browser/chromeos/login/login_wizard.h" | 23 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 23 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 24 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 24 #include "chrome/browser/chromeos/login/wizard_controller.h" | 25 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 25 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 26 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 26 #include "chrome/browser/chromeos/tether/tether_service.h" | 27 #include "chrome/browser/chromeos/tether/tether_service.h" |
| 27 #include "chrome/browser/profiles/profile.h" | 28 #include "chrome/browser/profiles/profile.h" |
| 28 #include "chrome/browser/signin/signin_manager_factory.h" | 29 #include "chrome/browser/signin/signin_manager_factory.h" |
| 29 #include "chrome/browser/ui/ash/ash_util.h" | 30 #include "chrome/browser/ui/ash/ash_util.h" |
| 30 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 if (!user) { | 101 if (!user) { |
| 101 // This is possible if crash occured after profile removal | 102 // This is possible if crash occured after profile removal |
| 102 // (see crbug.com/178290 for some more info). | 103 // (see crbug.com/178290 for some more info). |
| 103 LOG(ERROR) << "Could not get active user after crash."; | 104 LOG(ERROR) << "Could not get active user after crash."; |
| 104 return; | 105 return; |
| 105 } | 106 } |
| 106 user_session_mgr->InitRlz(user_profile); | 107 user_session_mgr->InitRlz(user_profile); |
| 107 user_session_mgr->InitializeCerts(user_profile); | 108 user_session_mgr->InitializeCerts(user_profile); |
| 108 user_session_mgr->InitializeCRLSetFetcher(user); | 109 user_session_mgr->InitializeCRLSetFetcher(user); |
| 109 user_session_mgr->InitializeCertificateTransparencyComponents(user); | 110 user_session_mgr->InitializeCertificateTransparencyComponents(user); |
| 111 if (lock_screen_apps::StateController::IsEnabled()) |
| 112 lock_screen_apps::StateController::Get()->SetPrimaryProfile(user_profile); |
| 110 | 113 |
| 111 arc::ArcServiceLauncher::Get()->OnPrimaryUserProfilePrepared(user_profile); | 114 arc::ArcServiceLauncher::Get()->OnPrimaryUserProfilePrepared(user_profile); |
| 112 | 115 |
| 113 TetherService* tether_service = TetherService::Get(user_profile); | 116 TetherService* tether_service = TetherService::Get(user_profile); |
| 114 if (tether_service) | 117 if (tether_service) |
| 115 tether_service->StartTetherIfEnabled(); | 118 tether_service->StartTetherIfEnabled(); |
| 116 | 119 |
| 117 // Send the PROFILE_PREPARED notification and call SessionStarted() | 120 // Send the PROFILE_PREPARED notification and call SessionStarted() |
| 118 // so that the Launcher and other Profile dependent classes are created. | 121 // so that the Launcher and other Profile dependent classes are created. |
| 119 content::NotificationService::current()->Notify( | 122 content::NotificationService::current()->Notify( |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 const std::string& user_id_hash, | 234 const std::string& user_id_hash, |
| 232 bool browser_restart) { | 235 bool browser_restart) { |
| 233 BootTimesRecorder* btl = BootTimesRecorder::Get(); | 236 BootTimesRecorder* btl = BootTimesRecorder::Get(); |
| 234 btl->AddLoginTimeMarker("UserLoggedIn-Start", false); | 237 btl->AddLoginTimeMarker("UserLoggedIn-Start", false); |
| 235 session_manager::SessionManager::NotifyUserLoggedIn( | 238 session_manager::SessionManager::NotifyUserLoggedIn( |
| 236 user_account_id, user_id_hash, browser_restart); | 239 user_account_id, user_id_hash, browser_restart); |
| 237 btl->AddLoginTimeMarker("UserLoggedIn-End", false); | 240 btl->AddLoginTimeMarker("UserLoggedIn-End", false); |
| 238 } | 241 } |
| 239 | 242 |
| 240 } // namespace chromeos | 243 } // namespace chromeos |
| OLD | NEW |