Chromium Code Reviews| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 session_manager::SessionManager::Get()->SessionStarted(); | 127 session_manager::SessionManager::Get()->SessionStarted(); |
| 128 | 128 |
| 129 // Now is the good time to retrieve other logged in users for this session. | 129 // Now is the good time to retrieve other logged in users for this session. |
| 130 // First user has been already marked as logged in and active in | 130 // First user has been already marked as logged in and active in |
| 131 // PreProfileInit(). Restore sessions for other users in the background. | 131 // PreProfileInit(). Restore sessions for other users in the background. |
| 132 user_session_mgr->RestoreActiveSessions(); | 132 user_session_mgr->RestoreActiveSessions(); |
| 133 } | 133 } |
| 134 | 134 |
| 135 bool is_running_test = command_line->HasSwitch(::switches::kTestName) || | 135 bool is_running_test = command_line->HasSwitch(::switches::kTestName) || |
| 136 command_line->HasSwitch(::switches::kTestType); | 136 command_line->HasSwitch(::switches::kTestType); |
| 137 | |
| 138 if (!is_running_test) { | 137 if (!is_running_test) { |
|
James Cook
2017/01/11 00:39:50
I took out the SessionControllerClient::FlushForTe
| |
| 139 // Enable CrasAudioHandler logging when chrome restarts after crashing. | 138 // Enable CrasAudioHandler logging when chrome restarts after crashing. |
| 140 if (chromeos::CrasAudioHandler::IsInitialized()) | 139 if (chromeos::CrasAudioHandler::IsInitialized()) |
| 141 chromeos::CrasAudioHandler::Get()->LogErrors(); | 140 chromeos::CrasAudioHandler::Get()->LogErrors(); |
| 142 | 141 |
| 143 // We did not log in (we crashed or are debugging), so we need to | 142 // We did not log in (we crashed or are debugging), so we need to |
| 144 // restore Sync. | 143 // restore Sync. |
| 145 UserSessionManager::GetInstance()->RestoreAuthenticationSession( | 144 UserSessionManager::GetInstance()->RestoreAuthenticationSession( |
| 146 user_profile); | 145 user_profile); |
| 147 } | 146 } |
| 148 } | 147 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 245 const std::string& user_id_hash, | 244 const std::string& user_id_hash, |
| 246 bool browser_restart) { | 245 bool browser_restart) { |
| 247 BootTimesRecorder* btl = BootTimesRecorder::Get(); | 246 BootTimesRecorder* btl = BootTimesRecorder::Get(); |
| 248 btl->AddLoginTimeMarker("UserLoggedIn-Start", false); | 247 btl->AddLoginTimeMarker("UserLoggedIn-Start", false); |
| 249 session_manager::SessionManager::NotifyUserLoggedIn( | 248 session_manager::SessionManager::NotifyUserLoggedIn( |
| 250 user_account_id, user_id_hash, browser_restart); | 249 user_account_id, user_id_hash, browser_restart); |
| 251 btl->AddLoginTimeMarker("UserLoggedIn-End", false); | 250 btl->AddLoginTimeMarker("UserLoggedIn-End", false); |
| 252 } | 251 } |
| 253 | 252 |
| 254 } // namespace chromeos | 253 } // namespace chromeos |
| OLD | NEW |