| # Copyright 2022 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| description "ChromiumOS feature daemon restart helper" |
| author "chromium-os-dev@chromium.org" |
| |
| # Features managed in chrome can change state when the browser restarts. So, |
| # send a dbus signal each time ash is re-initialized (that is, whenever the |
| # browser restarts). |
| # Services that want to receive the most recent feature state (NOTABLY INCLUDING |
| # state controlled by chrome://flags) must listen to this event and take action |
| # to fetch new state (e.g. restarting) when it happens. |
| start on ash-initialized |
| |
| task |
| |
| # This service enables services to determine when they should restart to pick |
| # up new feature state from the browser. It is exceedingly unlikely to OOM, |
| # as it's a simple dbus-send call, but better to kill it than to panic the |
| # system. |
| oom score -100 |
| |
| exec /usr/bin/dbus-send --system --sender=org.chromium.feature_lib \ |
| --type=signal /org/chromium/feature_lib \ |
| org.chromium.feature_lib.RefetchFeatureState |