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 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 ProfileHelper::Get()->FlushProfile(profile); | 1203 ProfileHelper::Get()->FlushProfile(profile); |
1204 | 1204 |
1205 // TODO(nkostylev): This pointer should probably never be NULL, but it looks | 1205 // TODO(nkostylev): This pointer should probably never be NULL, but it looks |
1206 // like OnProfileCreated() may be getting called before | 1206 // like OnProfileCreated() may be getting called before |
1207 // UserSessionManager::PrepareProfile() has set |delegate_| when Chrome is | 1207 // UserSessionManager::PrepareProfile() has set |delegate_| when Chrome is |
1208 // killed during shutdown in tests -- see http://crosbug.com/18269. Replace | 1208 // killed during shutdown in tests -- see http://crosbug.com/18269. Replace |
1209 // this 'if' statement with a CHECK(delegate_) once the underlying issue is | 1209 // this 'if' statement with a CHECK(delegate_) once the underlying issue is |
1210 // resolved. | 1210 // resolved. |
1211 if (delegate_) | 1211 if (delegate_) |
1212 delegate_->OnProfilePrepared(profile, browser_launched); | 1212 delegate_->OnProfilePrepared(profile, browser_launched); |
1213 | |
1214 // Check to see if this profile should show EndOfLife Notification and show | |
1215 // the message accordingly. | |
1216 if (!ShouldShowEolNotification(profile)) | |
1217 return; | |
1218 CheckEolStatus(profile); | |
1219 } | 1213 } |
1220 | 1214 |
1221 void UserSessionManager::ActivateWizard(const std::string& screen_name) { | 1215 void UserSessionManager::ActivateWizard(const std::string& screen_name) { |
1222 LoginDisplayHost* host = LoginDisplayHost::default_host(); | 1216 LoginDisplayHost* host = LoginDisplayHost::default_host(); |
1223 CHECK(host); | 1217 CHECK(host); |
1224 host->StartWizard(screen_name); | 1218 host->StartWizard(screen_name); |
1225 } | 1219 } |
1226 | 1220 |
1227 void UserSessionManager::InitializeStartUrls() const { | 1221 void UserSessionManager::InitializeStartUrls() const { |
1228 // Child account status should be known by the time of this call. | 1222 // Child account status should be known by the time of this call. |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1744 } | 1738 } |
1745 | 1739 |
1746 // Mark login host for deletion after browser starts. This | 1740 // Mark login host for deletion after browser starts. This |
1747 // guarantees that the message loop will be referenced by the | 1741 // guarantees that the message loop will be referenced by the |
1748 // browser before it is dereferenced by the login host. | 1742 // browser before it is dereferenced by the login host. |
1749 if (login_host) | 1743 if (login_host) |
1750 login_host->Finalize(); | 1744 login_host->Finalize(); |
1751 user_manager::UserManager::Get()->SessionStarted(); | 1745 user_manager::UserManager::Get()->SessionStarted(); |
1752 chromeos::BootTimesRecorder::Get()->LoginDone( | 1746 chromeos::BootTimesRecorder::Get()->LoginDone( |
1753 user_manager::UserManager::Get()->IsCurrentUserNew()); | 1747 user_manager::UserManager::Get()->IsCurrentUserNew()); |
| 1748 |
| 1749 // Check to see if this profile should show EndOfLife Notification and show |
| 1750 // the message accordingly. |
| 1751 if (!ShouldShowEolNotification(profile)) |
| 1752 return; |
| 1753 CheckEolStatus(profile); |
1754 } | 1754 } |
1755 | 1755 |
1756 void UserSessionManager::RespectLocalePreferenceWrapper( | 1756 void UserSessionManager::RespectLocalePreferenceWrapper( |
1757 Profile* profile, | 1757 Profile* profile, |
1758 const base::Closure& callback) { | 1758 const base::Closure& callback) { |
1759 if (browser_shutdown::IsTryingToQuit()) | 1759 if (browser_shutdown::IsTryingToQuit()) |
1760 return; | 1760 return; |
1761 | 1761 |
1762 // InputEventsBlocker is not available in Mash | 1762 // InputEventsBlocker is not available in Mash |
1763 if (chrome::IsRunningInMash()) { | 1763 if (chrome::IsRunningInMash()) { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1881 ->browser_policy_connector_chromeos() | 1881 ->browser_policy_connector_chromeos() |
1882 ->IsEnterpriseManaged()) { | 1882 ->IsEnterpriseManaged()) { |
1883 return false; | 1883 return false; |
1884 } | 1884 } |
1885 | 1885 |
1886 // Do not show end of life notification if this is a guest session | 1886 // Do not show end of life notification if this is a guest session |
1887 return !profile->IsGuestSession(); | 1887 return !profile->IsGuestSession(); |
1888 } | 1888 } |
1889 | 1889 |
1890 } // namespace chromeos | 1890 } // namespace chromeos |
OLD | NEW |