Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: chrome/browser/chromeos/eol_notification.cc

Issue 2712213002: Remove notification and message for security-only state (Closed)
Patch Set: rebase Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/ui/webui/help/help_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/eol_notification.cc
diff --git a/chrome/browser/chromeos/eol_notification.cc b/chrome/browser/chromeos/eol_notification.cc
index f246ac4e454668e91dce66fa379ce825ef1443a0..c9da0b449e35fb98ed15ab0f0fc6bb537018751c 100644
--- a/chrome/browser/chromeos/eol_notification.cc
+++ b/chrome/browser/chromeos/eol_notification.cc
@@ -116,8 +116,11 @@ void EolNotification::OnEolStatus(update_engine::EndOfLifeStatus status) {
profile_->GetPrefs()->GetInteger(prefs::kEolStatus);
profile_->GetPrefs()->SetInteger(prefs::kEolStatus, status_);
- if (status_ == update_engine::EndOfLifeStatus::kSupported)
+ // Security only state is no longer supported.
+ if (status_ == update_engine::EndOfLifeStatus::kSupported ||
+ status_ == update_engine::EndOfLifeStatus::kSecurityOnly) {
return;
+ }
if (pre_eol_status != status_) {
// If Eol status has changed, we should reset
@@ -130,11 +133,6 @@ void EolNotification::OnEolStatus(update_engine::EndOfLifeStatus status) {
if (user_dismissed_eol_notification)
return;
- // When device is in Security-Only state, only show notification the first
- // time.
- if (status_ == update_engine::EndOfLifeStatus::kSecurityOnly)
- profile_->GetPrefs()->SetBoolean(prefs::kEolNotificationDismissed, true);
-
Update();
}
@@ -154,7 +152,8 @@ void EolNotification::Update() {
Notification notification(
message_center::NOTIFICATION_TYPE_SIMPLE,
- l10n_util::GetStringUTF16(IDS_EOL_NOTIFICATION_TITLE), GetEolMessage(),
+ l10n_util::GetStringUTF16(IDS_EOL_NOTIFICATION_TITLE),
+ l10n_util::GetStringUTF16(IDS_EOL_NOTIFICATION_EOL),
gfx::Image(
CreateVectorIcon(gfx::VectorIconId::EOL, kNotificationIconColor)),
message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
@@ -164,12 +163,4 @@ void EolNotification::Update() {
g_browser_process->notification_ui_manager()->Add(notification, profile_);
}
-base::string16 EolNotification::GetEolMessage() {
- if (status_ == update_engine::EndOfLifeStatus::kSecurityOnly) {
- return l10n_util::GetStringUTF16(IDS_EOL_NOTIFICATION_SECURITY_ONLY);
- } else {
- return l10n_util::GetStringUTF16(IDS_EOL_NOTIFICATION_EOL);
- }
-}
-
} // namespace chromeos
« no previous file with comments | « chrome/app/chromeos_strings.grdp ('k') | chrome/browser/ui/webui/help/help_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698