Skip to content

Commit

Permalink
[Chromecast] Add a reboot reason for anomaly detector
Browse files Browse the repository at this point in the history
Bug: internal b/189446805
Test: local build
Change-Id: Ia2da33bccb36fd6cd0159953216af912b62e55d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3192884
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Commit-Queue: Yuqi Sun <sunyq@google.com>
Cr-Commit-Position: refs/heads/main@{#927584}
  • Loading branch information
Yuqi Sun authored and Chromium LUCI CQ committed Oct 4, 2021
1 parent 5896701 commit be1b39c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chromecast/public/reboot_shlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ class CHROMECAST_EXPORT RebootShlib {
// risky to attempt without a full process restart. Very few experiments
// trigger this path.
EXPERIMENT_CHANGE = 19,

// A reboot is triggered when the anomaly detection service detects a
// system-level anomaly and needs to recover from it with restarting the
// Cast component.
ANOMALY = 20,
};

// Initializes any platform-specific reboot systems.
Expand Down
1 change: 1 addition & 0 deletions chromecast/system/reboot/reboot_util_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ bool RebootUtil::IsValidRebootSource(RebootShlib::RebootSource reboot_source) {
case RebootShlib::RebootSource::MULTI_SERVICE_BUG:
case RebootShlib::RebootSource::POWER_MANAGER_SHUTDOWN:
case RebootShlib::RebootSource::EXPERIMENT_CHANGE:
case RebootShlib::RebootSource::ANOMALY:
return true;
default:
return false;
Expand Down

0 comments on commit be1b39c

Please sign in to comment.