Skip to content

Commit

Permalink
Add a reboot source for experiment update.
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
Yilong Yao authored and Chromium LUCI CQ committed Apr 27, 2021
1 parent 24b911d commit 431f852
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chromecast/public/reboot_shlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions chromecast/system/reboot/reboot_util_core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 431f852

Please sign in to comment.