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 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 user_manager::known_user::UpdateUsingSAML(user_context_.GetAccountId(), | 1129 user_manager::known_user::UpdateUsingSAML(user_context_.GetAccountId(), |
1130 true); | 1130 true); |
1131 SAMLOfflineSigninLimiter* saml_offline_signin_limiter = | 1131 SAMLOfflineSigninLimiter* saml_offline_signin_limiter = |
1132 SAMLOfflineSigninLimiterFactory::GetForProfile(profile); | 1132 SAMLOfflineSigninLimiterFactory::GetForProfile(profile); |
1133 if (saml_offline_signin_limiter) | 1133 if (saml_offline_signin_limiter) |
1134 saml_offline_signin_limiter->SignedIn(user_context_.GetAuthFlow()); | 1134 saml_offline_signin_limiter->SignedIn(user_context_.GetAuthFlow()); |
1135 } | 1135 } |
1136 | 1136 |
1137 profile->OnLogin(); | 1137 profile->OnLogin(); |
1138 | 1138 |
1139 g_browser_process->platform_part()->SessionManager()->SetSessionState( | 1139 session_manager::SessionManager::Get()->SetSessionState( |
1140 session_manager::SessionState::LOGGED_IN_NOT_ACTIVE); | 1140 session_manager::SessionState::LOGGED_IN_NOT_ACTIVE); |
1141 | 1141 |
1142 // Send the notification before creating the browser so additional objects | 1142 // Send the notification before creating the browser so additional objects |
1143 // that need the profile (e.g. the launcher) can be created first. | 1143 // that need the profile (e.g. the launcher) can be created first. |
1144 content::NotificationService::current()->Notify( | 1144 content::NotificationService::current()->Notify( |
1145 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 1145 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
1146 content::NotificationService::AllSources(), | 1146 content::NotificationService::AllSources(), |
1147 content::Details<Profile>(profile)); | 1147 content::Details<Profile>(profile)); |
1148 | 1148 |
1149 // Initialize various services only for primary user. | 1149 // Initialize various services only for primary user. |
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1735 new QuickUnlockNotificationController(profile); | 1735 new QuickUnlockNotificationController(profile); |
1736 quick_unlock_notification_handler_.insert( | 1736 quick_unlock_notification_handler_.insert( |
1737 std::make_pair(profile, qu_feature_notification_controller)); | 1737 std::make_pair(profile, qu_feature_notification_controller)); |
1738 } | 1738 } |
1739 | 1739 |
1740 // Mark login host for deletion after browser starts. This | 1740 // Mark login host for deletion after browser starts. This |
1741 // guarantees that the message loop will be referenced by the | 1741 // guarantees that the message loop will be referenced by the |
1742 // browser before it is dereferenced by the login host. | 1742 // browser before it is dereferenced by the login host. |
1743 if (login_host) | 1743 if (login_host) |
1744 login_host->Finalize(); | 1744 login_host->Finalize(); |
1745 g_browser_process->platform_part()->SessionManager()->SessionStarted(); | 1745 session_manager::SessionManager::Get()->SessionStarted(); |
1746 chromeos::BootTimesRecorder::Get()->LoginDone( | 1746 chromeos::BootTimesRecorder::Get()->LoginDone( |
1747 user_manager::UserManager::Get()->IsCurrentUserNew()); | 1747 user_manager::UserManager::Get()->IsCurrentUserNew()); |
1748 | 1748 |
1749 // Check to see if this profile should show EndOfLife Notification and show | 1749 // Check to see if this profile should show EndOfLife Notification and show |
1750 // the message accordingly. | 1750 // the message accordingly. |
1751 if (ShouldShowEolNotification(profile)) | 1751 if (ShouldShowEolNotification(profile)) |
1752 CheckEolStatus(profile); | 1752 CheckEolStatus(profile); |
1753 } | 1753 } |
1754 | 1754 |
1755 void UserSessionManager::RespectLocalePreferenceWrapper( | 1755 void UserSessionManager::RespectLocalePreferenceWrapper( |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1880 ->browser_policy_connector_chromeos() | 1880 ->browser_policy_connector_chromeos() |
1881 ->IsEnterpriseManaged()) { | 1881 ->IsEnterpriseManaged()) { |
1882 return false; | 1882 return false; |
1883 } | 1883 } |
1884 | 1884 |
1885 // Do not show end of life notification if this is a guest session | 1885 // Do not show end of life notification if this is a guest session |
1886 return !profile->IsGuestSession(); | 1886 return !profile->IsGuestSession(); |
1887 } | 1887 } |
1888 | 1888 |
1889 } // namespace chromeos | 1889 } // namespace chromeos |
OLD | NEW |