| Index: chrome/browser/chromeos/login/session/user_session_manager.cc
|
| diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
|
| index 2ae53b8129c8a0e37568291cb58fc0339c33cd29..b1cfb22ac70ef93f75410a9d20dc5f8cf7f9fa42 100644
|
| --- a/chrome/browser/chromeos/login/session/user_session_manager.cc
|
| +++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
|
| @@ -1210,6 +1210,16 @@ void UserSessionManager::FinalizePrepareProfile(Profile* profile) {
|
| // resolved.
|
| if (delegate_)
|
| delegate_->OnProfilePrepared(profile, browser_launched);
|
| +
|
| + // Check to see if this profile should show EndOfLife Notification and show
|
| + // the message accordingly.
|
| + if (!ShouldShowEolNotification(profile)) {
|
| + eol_notification_.reset();
|
| + return;
|
| + }
|
| + if (!eol_notification_)
|
| + eol_notification_.reset(new EolNotification(profile));
|
| + eol_notification_->CheckEolStatus();
|
| }
|
|
|
| void UserSessionManager::ActivateWizard(const std::string& screen_name) {
|
| @@ -1851,4 +1861,25 @@ void UserSessionManager::CreateTokenUtilIfMissing() {
|
| token_handle_util_.reset(new TokenHandleUtil());
|
| }
|
|
|
| +bool UserSessionManager::ShouldShowEolNotification(Profile* profile) {
|
| + if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + chromeos::switches::kEnableEolNotification)) {
|
| + return false;
|
| + }
|
| +
|
| + // Do not show end of life notification if this device is managed by
|
| + // enterprise user.
|
| + if (g_browser_process->platform_part()
|
| + ->browser_policy_connector_chromeos()
|
| + ->IsEnterpriseManaged()) {
|
| + return false;
|
| + }
|
| +
|
| + // Do not show end of life notification if this is a guest session
|
| + if (profile->IsGuestSession())
|
| + return false;
|
| +
|
| + return true;
|
| +}
|
| +
|
| } // namespace chromeos
|
|
|