update_engine: UpdateAttempter manages lifetime of Excluder
Prior to adding the exclusion logic within various |Action|s, the
|UpdateAttempter| provides a way to access the |Excluder| encapsulated
within the |UpdateAttempter| singleton.
|PayloadState| uses |Excluder| from |UpdateAttempter| as a member.
BUG=chromium:928805
TEST=FEATURES=test emerge-$B update_engine
TEST=USE="${USE} -dlc" FEATURES=test emerge-$B update_engine
Change-Id: I63ace436e8aacd349e13004fe1e2f4dd37479978
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2190236
Tested-by: Jae Hoon Kim <kimjae@chromium.org>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
Auto-Submit: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/payload_state.h b/payload_state.h
index bfe2cf0..bc4bf0d 100644
--- a/payload_state.h
+++ b/payload_state.h
@@ -24,6 +24,7 @@
#include <base/time/time.h>
#include <gtest/gtest_prod.h> // for FRIEND_TEST
+#include "update_engine/common/excluder_interface.h"
#include "update_engine/common/prefs_interface.h"
#include "update_engine/metrics_constants.h"
#include "update_engine/payload_state_interface.h"
@@ -429,6 +430,11 @@
// This object persists across powerwashes.
PrefsInterface* powerwash_safe_prefs_;
+ // Interface object with which we determine exclusion decisions for
+ // payloads/partitions during the update. This must be set by calling the
+ // Initialize method before calling any other method.
+ ExcluderInterface* excluder_;
+
// This is the current response object from Omaha.
OmahaResponse response_;