| 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" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "chrome/browser/profiles/profile.h" | 26 #include "chrome/browser/profiles/profile.h" |
| 27 #include "chrome/browser/signin/signin_manager_factory.h" | 27 #include "chrome/browser/signin/signin_manager_factory.h" |
| 28 #include "chrome/browser/ui/ash/ash_util.h" | 28 #include "chrome/browser/ui/ash/ash_util.h" |
| 29 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
| 30 #include "chrome/common/pref_names.h" | 30 #include "chrome/common/pref_names.h" |
| 31 #include "chromeos/audio/cras_audio_handler.h" | 31 #include "chromeos/audio/cras_audio_handler.h" |
| 32 #include "chromeos/chromeos_switches.h" | 32 #include "chromeos/chromeos_switches.h" |
| 33 #include "chromeos/cryptohome/cryptohome_parameters.h" | 33 #include "chromeos/cryptohome/cryptohome_parameters.h" |
| 34 #include "chromeos/dbus/dbus_thread_manager.h" | 34 #include "chromeos/dbus/dbus_thread_manager.h" |
| 35 #include "chromeos/dbus/session_manager_client.h" | 35 #include "chromeos/dbus/session_manager_client.h" |
| 36 #include "components/arc/arc_bridge_service.h" | |
| 37 #include "components/prefs/pref_service.h" | 36 #include "components/prefs/pref_service.h" |
| 38 #include "components/signin/core/account_id/account_id.h" | 37 #include "components/signin/core/account_id/account_id.h" |
| 39 #include "components/signin/core/browser/signin_manager.h" | 38 #include "components/signin/core/browser/signin_manager.h" |
| 40 #include "components/user_manager/user_manager.h" | 39 #include "components/user_manager/user_manager.h" |
| 41 #include "components/user_manager/user_names.h" | 40 #include "components/user_manager/user_names.h" |
| 42 #include "content/public/browser/notification_service.h" | 41 #include "content/public/browser/notification_service.h" |
| 43 #include "content/public/common/content_switches.h" | 42 #include "content/public/common/content_switches.h" |
| 44 | 43 |
| 45 namespace chromeos { | 44 namespace chromeos { |
| 46 | 45 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // This is possible if crash occured after profile removal | 98 // This is possible if crash occured after profile removal |
| 100 // (see crbug.com/178290 for some more info). | 99 // (see crbug.com/178290 for some more info). |
| 101 LOG(ERROR) << "Could not get active user after crash."; | 100 LOG(ERROR) << "Could not get active user after crash."; |
| 102 return; | 101 return; |
| 103 } | 102 } |
| 104 user_session_mgr->InitRlz(user_profile); | 103 user_session_mgr->InitRlz(user_profile); |
| 105 user_session_mgr->InitializeCerts(user_profile); | 104 user_session_mgr->InitializeCerts(user_profile); |
| 106 user_session_mgr->InitializeCRLSetFetcher(user); | 105 user_session_mgr->InitializeCRLSetFetcher(user); |
| 107 user_session_mgr->InitializeCertificateTransparencyComponents(user); | 106 user_session_mgr->InitializeCertificateTransparencyComponents(user); |
| 108 | 107 |
| 109 if (arc::ArcBridgeService::GetEnabled( | 108 arc::ArcServiceLauncher::Get()->OnPrimaryUserProfilePrepared(user_profile); |
| 110 base::CommandLine::ForCurrentProcess())) { | |
| 111 arc::ArcServiceLauncher::Get()->OnPrimaryUserProfilePrepared( | |
| 112 user_profile); | |
| 113 } | |
| 114 | 109 |
| 115 // Send the PROFILE_PREPARED notification and call SessionStarted() | 110 // Send the PROFILE_PREPARED notification and call SessionStarted() |
| 116 // so that the Launcher and other Profile dependent classes are created. | 111 // so that the Launcher and other Profile dependent classes are created. |
| 117 content::NotificationService::current()->Notify( | 112 content::NotificationService::current()->Notify( |
| 118 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 113 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 119 content::NotificationService::AllSources(), | 114 content::NotificationService::AllSources(), |
| 120 content::Details<Profile>(user_profile)); | 115 content::Details<Profile>(user_profile)); |
| 121 | 116 |
| 122 // This call will set session state to SESSION_STATE_ACTIVE (same one). | 117 // This call will set session state to SESSION_STATE_ACTIVE (same one). |
| 123 session_manager::SessionManager::Get()->SessionStarted(); | 118 session_manager::SessionManager::Get()->SessionStarted(); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 const std::string& user_id_hash, | 230 const std::string& user_id_hash, |
| 236 bool browser_restart) { | 231 bool browser_restart) { |
| 237 BootTimesRecorder* btl = BootTimesRecorder::Get(); | 232 BootTimesRecorder* btl = BootTimesRecorder::Get(); |
| 238 btl->AddLoginTimeMarker("UserLoggedIn-Start", false); | 233 btl->AddLoginTimeMarker("UserLoggedIn-Start", false); |
| 239 session_manager::SessionManager::NotifyUserLoggedIn( | 234 session_manager::SessionManager::NotifyUserLoggedIn( |
| 240 user_account_id, user_id_hash, browser_restart); | 235 user_account_id, user_id_hash, browser_restart); |
| 241 btl->AddLoginTimeMarker("UserLoggedIn-End", false); | 236 btl->AddLoginTimeMarker("UserLoggedIn-End", false); |
| 242 } | 237 } |
| 243 | 238 |
| 244 } // namespace chromeos | 239 } // namespace chromeos |
| OLD | NEW |