update_engine: Store fingerprint value from Omaha response.
Store the unique fp value from response into prefs. Value is later sent
to Omaha to determine if there is a subsequent update available
while the system is waiting to be rebooted.
BUG=b:161259884
TEST=cros_workon_make --board=hatch --test update_engine
Change-Id: Ie37aa5da3cd8a0820e633f5ef426fb50e8a02838
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2491618
Tested-by: Vyshu Khota <vyshu@google.com>
Commit-Queue: Vyshu Khota <vyshu@google.com>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
diff --git a/cros/update_attempter.h b/cros/update_attempter.h
index bd0aef6..a201acf 100644
--- a/cros/update_attempter.h
+++ b/cros/update_attempter.h
@@ -433,6 +433,11 @@
// Resets all the DLC prefs.
bool ResetDlcPrefs(const std::string& dlc_id);
+ // Sets given pref key for DLC and platform.
+ void SetPref(const std::string& pref_key,
+ const std::string& pref_value,
+ const std::string& payload_id);
+
// Get the integer values from the DLC metadata for |kPrefsPingLastActive|
// or |kPrefsPingLastRollcall|.
// The value is equal to -2 when the value cannot be read or is not numeric.