Don't send metrics on update_engine restart without reboot.
Certain operations are performed on update_engine start that are
intended to be performed only right after boot. For example, when
an update is applied, a few metrics are sent during the next reboot
when update_engine starts. If the update is applied and
update_engine crashes before reboot, the new update_engine will send
the metrics as if the machine was rebooted.
This patch avoids this problem checking the
SystemState::system_rebooted() method.
BUG=chromium:260990
TEST=unittests
Change-Id: Ib360b1886db38e3abd926455edfa1eb657b2d621
Reviewed-on: https://gerrit.chromium.org/gerrit/63227
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
2 files changed