| 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/login/lock/webui_screen_locker.h" | 21 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" |
| 22 #include "chrome/browser/chromeos/login/login_wizard.h" | 22 #include "chrome/browser/chromeos/login/login_wizard.h" |
| 23 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 23 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 24 #include "chrome/browser/chromeos/login/wizard_controller.h" | 24 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 25 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 25 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 26 #include "chrome/browser/chromeos/tether/tether_service.h" |
| 26 #include "chrome/browser/profiles/profile.h" | 27 #include "chrome/browser/profiles/profile.h" |
| 27 #include "chrome/browser/signin/signin_manager_factory.h" | 28 #include "chrome/browser/signin/signin_manager_factory.h" |
| 28 #include "chrome/browser/ui/ash/ash_util.h" | 29 #include "chrome/browser/ui/ash/ash_util.h" |
| 29 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
| 30 #include "chrome/common/pref_names.h" | 31 #include "chrome/common/pref_names.h" |
| 31 #include "chromeos/audio/cras_audio_handler.h" | 32 #include "chromeos/audio/cras_audio_handler.h" |
| 32 #include "chromeos/chromeos_switches.h" | 33 #include "chromeos/chromeos_switches.h" |
| 33 #include "chromeos/cryptohome/cryptohome_parameters.h" | 34 #include "chromeos/cryptohome/cryptohome_parameters.h" |
| 34 #include "chromeos/dbus/dbus_thread_manager.h" | 35 #include "chromeos/dbus/dbus_thread_manager.h" |
| 35 #include "chromeos/dbus/session_manager_client.h" | 36 #include "chromeos/dbus/session_manager_client.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 LOG(ERROR) << "Could not get active user after crash."; | 103 LOG(ERROR) << "Could not get active user after crash."; |
| 103 return; | 104 return; |
| 104 } | 105 } |
| 105 user_session_mgr->InitRlz(user_profile); | 106 user_session_mgr->InitRlz(user_profile); |
| 106 user_session_mgr->InitializeCerts(user_profile); | 107 user_session_mgr->InitializeCerts(user_profile); |
| 107 user_session_mgr->InitializeCRLSetFetcher(user); | 108 user_session_mgr->InitializeCRLSetFetcher(user); |
| 108 user_session_mgr->InitializeCertificateTransparencyComponents(user); | 109 user_session_mgr->InitializeCertificateTransparencyComponents(user); |
| 109 | 110 |
| 110 arc::ArcServiceLauncher::Get()->OnPrimaryUserProfilePrepared(user_profile); | 111 arc::ArcServiceLauncher::Get()->OnPrimaryUserProfilePrepared(user_profile); |
| 111 | 112 |
| 113 TetherService::Get(user_profile)->StartTetherIfEnabled(); |
| 114 |
| 112 // Send the PROFILE_PREPARED notification and call SessionStarted() | 115 // Send the PROFILE_PREPARED notification and call SessionStarted() |
| 113 // so that the Launcher and other Profile dependent classes are created. | 116 // so that the Launcher and other Profile dependent classes are created. |
| 114 content::NotificationService::current()->Notify( | 117 content::NotificationService::current()->Notify( |
| 115 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 118 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 116 content::NotificationService::AllSources(), | 119 content::NotificationService::AllSources(), |
| 117 content::Details<Profile>(user_profile)); | 120 content::Details<Profile>(user_profile)); |
| 118 | 121 |
| 119 // This call will set session state to SESSION_STATE_ACTIVE (same one). | 122 // This call will set session state to SESSION_STATE_ACTIVE (same one). |
| 120 session_manager::SessionManager::Get()->SessionStarted(); | 123 session_manager::SessionManager::Get()->SessionStarted(); |
| 121 | 124 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 const std::string& user_id_hash, | 229 const std::string& user_id_hash, |
| 227 bool browser_restart) { | 230 bool browser_restart) { |
| 228 BootTimesRecorder* btl = BootTimesRecorder::Get(); | 231 BootTimesRecorder* btl = BootTimesRecorder::Get(); |
| 229 btl->AddLoginTimeMarker("UserLoggedIn-Start", false); | 232 btl->AddLoginTimeMarker("UserLoggedIn-Start", false); |
| 230 session_manager::SessionManager::NotifyUserLoggedIn( | 233 session_manager::SessionManager::NotifyUserLoggedIn( |
| 231 user_account_id, user_id_hash, browser_restart); | 234 user_account_id, user_id_hash, browser_restart); |
| 232 btl->AddLoginTimeMarker("UserLoggedIn-End", false); | 235 btl->AddLoginTimeMarker("UserLoggedIn-End", false); |
| 233 } | 236 } |
| 234 | 237 |
| 235 } // namespace chromeos | 238 } // namespace chromeos |
| OLD | NEW |