0

Add a reboot source for experiment update.

Bug: 180755485
Test: CQ
Change-Id: I0a708a919b23edcc9edb479af1720bcf110c621d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2852162
Reviewed-by: Simeon Anfinrud <sanfin@chromium.org>
Reviewed-by: Luke Halliwell (slow) <halliwell@chromium.org>
Auto-Submit: Yilong Yao <yilongyao@google.com>
Commit-Queue: Yilong Yao <yilongyao@google.com>
Cr-Commit-Position: refs/heads/master@{#876699}
This commit is contained in:
Yilong Yao
2021-04-27 19:20:05 +00:00
committed by Chromium LUCI CQ
parent 24b911deea
commit 431f8525e4
2 changed files with 11 additions and 0 deletions
chromecast

@ -94,6 +94,15 @@ class CHROMECAST_EXPORT RebootShlib {
// bugs. In that case, business logic can't proceed and busy references
// can't be trusted, so a dirty reboot will be executed.
MULTI_SERVICE_BUG = 17,
// Intentional shutdown by power manager of battery powered devices.
POWER_MANAGER_SHUTDOWN = 18,
// Restart of the Cast component to apply changes due to an experiment flag
// value change. This is only used to handle flag changes that would be more
// risky to attempt without a full process restart. Very few experiments
// trigger this path.
EXPERIMENT_CHANGE = 19,
};
// Initializes any platform-specific reboot systems.

@ -46,6 +46,8 @@ bool RebootUtil::IsValidRebootSource(RebootShlib::RebootSource reboot_source) {
case RebootShlib::RebootSource::GRACEFUL_RESTART:
case RebootShlib::RebootSource::UNGRACEFUL_RESTART:
case RebootShlib::RebootSource::MULTI_SERVICE_BUG:
case RebootShlib::RebootSource::POWER_MANAGER_SHUTDOWN:
case RebootShlib::RebootSource::EXPERIMENT_CHANGE:
return true;
default:
return false;