| Index: chrome/browser/chromeos/login/existing_user_controller.cc
|
| diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
|
| index 3a1848ca433b42cfb2a545e7efc63465d9e94d33..4cb495998441f99a3b835896dc4eabd9b48d8bdc 100644
|
| --- a/chrome/browser/chromeos/login/existing_user_controller.cc
|
| +++ b/chrome/browser/chromeos/login/existing_user_controller.cc
|
| @@ -159,6 +159,27 @@ void RecordPasswordChangeFlow(LoginPasswordChangeFlow flow) {
|
| LOGIN_PASSWORD_CHANGE_FLOW_COUNT);
|
| }
|
|
|
| +bool 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
|
|
|
| // static
|
| @@ -709,6 +730,15 @@ void ExistingUserController::OnProfilePrepared(Profile* profile,
|
| auth_status_consumer_->OnAuthSuccess(
|
| UserContext(last_login_attempt_account_id_));
|
| }
|
| +
|
| + if (!ShouldShowEolNotification(profile)) {
|
| + eol_notification_.reset();
|
| + return;
|
| + }
|
| +
|
| + if (!eol_notification_)
|
| + eol_notification_.reset(new EolNotification(profile));
|
| + eol_notification_->GetEolStatus();
|
| }
|
|
|
| void ExistingUserController::OnOffTheRecordAuthSuccess() {
|
|
|