Allow null SystemState in the DownloadAction.
The SystemState is only defined in the libupdate_engine library, so
it may not be defined for other users of libpayload_consumer. This
patch allows to pass a nullptr for the SystemState while explicitly
passing the other classes defined in libpayload_consumer upon
construction.
Bug: None
TEST=FEATURES=test emerge-link update_engine
TEST=`mmma system/update_engine` on aosp_arm-eng and edison-eng
Change-Id: I535d0184a85e0a167ac65875f6e7c07832efbf40
diff --git a/update_attempter.cc b/update_attempter.cc
index b826121..aeb433b 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -617,11 +617,12 @@
LibcurlHttpFetcher* download_fetcher =
new LibcurlHttpFetcher(GetProxyResolver(), system_state_->hardware());
download_fetcher->set_server_to_check(ServerToCheck::kDownload);
- shared_ptr<DownloadAction> download_action(
- new DownloadAction(prefs_,
- system_state_,
- new MultiRangeHttpFetcher(
- download_fetcher))); // passes ownership
+ shared_ptr<DownloadAction> download_action(new DownloadAction(
+ prefs_,
+ system_state_->boot_control(),
+ system_state_->hardware(),
+ system_state_,
+ new MultiRangeHttpFetcher(download_fetcher))); // passes ownership
shared_ptr<OmahaRequestAction> download_finished_action(
new OmahaRequestAction(
system_state_,