Skip to content

Commit

Permalink
Adjust the message for Roll-forward update
Browse files Browse the repository at this point in the history
When roll-forward update happens, adjust the message to
"Update installed, pending restart", as it's more appropriate than the
previous message "Failed to update, error code is 21".

b/382561808

Change-Id: I72a6e31052f3894c53ea1e3344c19b910764a205
  • Loading branch information
yuying-y committed Dec 9, 2024
1 parent c17e632 commit c2aaca6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions chrome/updater/updater_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,23 @@ void Observer::OnEvent(Events event, const std::string& id) {
status = "Status is unknown.";
} else if (crx_update_item_.state == ComponentState::kUpToDate &&
updater_configurator_->GetPreviousUpdaterStatus().compare(
updater_status_string_map.find(UpdaterStatus::kUpdated)
->second) == 0) {
updater_status_string_map[UpdaterStatus::kUpdated]) == 0) {
status = std::string(
updater_status_string_map.find(UpdaterStatus::kUpdated)->second);
updater_status_string_map[UpdaterStatus::kUpdated]);
} else {
status = std::string(
updater_status_string_map.find(status_iterator->second)->second);
}
if (crx_update_item_.state == ComponentState::kUpdateError) {
status +=
", error code is " + std::to_string(crx_update_item_.error_code);
// QUICK_ROLL_FORWARD update, adjust the message to "Update installed,
// pending restart"
if (crx_update_item_.error_code == 21) {
status = std::string(
updater_status_string_map[UpdaterStatus::kUpdated]);
} else {
status +=
", error code is " + std::to_string(crx_update_item_.error_code);
}
}
if (updater_notification_ext_ != nullptr) {
updater_notification_ext_->UpdaterState(
Expand Down

0 comments on commit c2aaca6

Please sign in to comment.