Remove SystemState dependency from HttpFetcher and InstallPlan.
The SystemState class is an aggregation of all the update_engine
singletons, making it easy to handle cross-dependencies between these
singletons. Nevertheless, since we split the code into a smaller
libpayload_consumer library we need to remove the global dependencies
on the SystemState class from this library and specialize those
dependencies to the actual required class.
Bug: 25773375
TEST=FEATURES=test emerge-link update_engine; mma
Change-Id: I8800157c969db6a8d168f33ac2c6aad4f34fa236
diff --git a/payload_consumer/delta_performer.cc b/payload_consumer/delta_performer.cc
index 99db3bf..21d8e54 100644
--- a/payload_consumer/delta_performer.cc
+++ b/payload_consumer/delta_performer.cc
@@ -803,7 +803,7 @@
install_plan_->partitions.push_back(install_part);
}
- if (!install_plan_->LoadPartitionsFromSlots(system_state_)) {
+ if (!install_plan_->LoadPartitionsFromSlots(system_state_->boot_control())) {
LOG(ERROR) << "Unable to determine all the partition devices.";
*error = ErrorCode::kInstallDeviceOpenError;
return false;