| 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 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 user_context_.GetAccountId(), user_context_.GetUserIDHash()); | 891 user_context_.GetAccountId(), user_context_.GetUserIDHash()); |
| 892 } | 892 } |
| 893 | 893 |
| 894 void UserSessionManager::PreStartSession() { | 894 void UserSessionManager::PreStartSession() { |
| 895 // Switch log file as soon as possible. | 895 // Switch log file as soon as possible. |
| 896 if (base::SysInfo::IsRunningOnChromeOS()) | 896 if (base::SysInfo::IsRunningOnChromeOS()) |
| 897 logging::RedirectChromeLogging(*(base::CommandLine::ForCurrentProcess())); | 897 logging::RedirectChromeLogging(*(base::CommandLine::ForCurrentProcess())); |
| 898 } | 898 } |
| 899 | 899 |
| 900 void UserSessionManager::StoreUserContextDataBeforeProfileIsCreated() { | 900 void UserSessionManager::StoreUserContextDataBeforeProfileIsCreated() { |
| 901 // Store obfuscated GAIA ID. | 901 user_manager::known_user::UpdateId(user_context_.GetAccountId()); |
| 902 if (!user_context_.GetGaiaID().empty()) { | |
| 903 user_manager::known_user::UpdateGaiaID(user_context_.GetAccountId(), | |
| 904 user_context_.GetGaiaID()); | |
| 905 } | |
| 906 } | 902 } |
| 907 | 903 |
| 908 void UserSessionManager::StartCrosSession() { | 904 void UserSessionManager::StartCrosSession() { |
| 909 BootTimesRecorder* btl = BootTimesRecorder::Get(); | 905 BootTimesRecorder* btl = BootTimesRecorder::Get(); |
| 910 btl->AddLoginTimeMarker("StartSession-Start", false); | 906 btl->AddLoginTimeMarker("StartSession-Start", false); |
| 911 DBusThreadManager::Get()->GetSessionManagerClient()->StartSession( | 907 DBusThreadManager::Get()->GetSessionManagerClient()->StartSession( |
| 912 cryptohome::Identification(user_context_.GetAccountId())); | 908 cryptohome::Identification(user_context_.GetAccountId())); |
| 913 btl->AddLoginTimeMarker("StartSession-End", false); | 909 btl->AddLoginTimeMarker("StartSession-End", false); |
| 914 } | 910 } |
| 915 | 911 |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1839 ->browser_policy_connector_chromeos() | 1835 ->browser_policy_connector_chromeos() |
| 1840 ->IsEnterpriseManaged()) { | 1836 ->IsEnterpriseManaged()) { |
| 1841 return false; | 1837 return false; |
| 1842 } | 1838 } |
| 1843 | 1839 |
| 1844 // Do not show end of life notification if this is a guest session | 1840 // Do not show end of life notification if this is a guest session |
| 1845 return !profile->IsGuestSession(); | 1841 return !profile->IsGuestSession(); |
| 1846 } | 1842 } |
| 1847 | 1843 |
| 1848 } // namespace chromeos | 1844 } // namespace chromeos |
| OLD | NEW |