update_engine: Query dlcservice to avoid stale DLC module IDs
Within |UpdateAttempter|, the possibility of using stale DLC module IDs
existed. This should never happen. The fix is to go through |DlcService|
to recieve the list of fresh and current DLC module IDs. This change now
will handle both interactive and non-interactive update cases.
This is only for updates.
BUG=chromium:978525
TEST=FEATURES="test" emerge-${BOARD} update_engine
Change-Id: Iffa75f60f367b2a110c559654fa3df9c48c714b1
diff --git a/dlcservice_chromeos.h b/dlcservice_chromeos.h
index 8d103c1..73442e6 100644
--- a/dlcservice_chromeos.h
+++ b/dlcservice_chromeos.h
@@ -33,6 +33,10 @@
~DlcServiceChromeOS() = default;
// BootControlInterface overrides.
+ // Will clear the |dlc_module_ids|, passed to be modified. Clearing by
+ // default has the added benefit of avoiding indeterminate behavior in the
+ // case that |dlc_module_ids| wasn't empty to begin which would lead to
+ // possible duplicates and cases when error was not checked it's still safe.
bool GetInstalled(std::vector<std::string>* dlc_module_ids) override;
private: