Split payload application code into a subdirectory.
This patch splits from the main libupdate_engine code the part that
is strictly used to download and apply a payload into a new static
library, moving the code to subdirectories. The new library is divided
in two subdirectories: common/ and payload_consumer/, and should not
depend on other update_engine files outside those two subdirectories.
The main difference between those two is that the common/ tools are more
generic and not tied to the payload consumer process, but otherwise they
are both compiled together.
There are still dependencies from the new libpayload_consumer library
into the main directory files and DBus generated files. Those will be
addressed in follow up CLs.
Bug: 25197634
Test: FEATURES=test emerge-link update_engine; `mm` on Brillo.
Change-Id: Id8d0204ea573627e6e26ca9ea17b9592ca95bc23
diff --git a/update_attempter.cc b/update_attempter.cc
index 7d6aaf2..ce2acbb 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -41,31 +41,31 @@
#include <power_manager/dbus-proxies.h>
#include <update_engine/dbus-constants.h>
-#include "update_engine/boot_control_interface.h"
-#include "update_engine/certificate_checker.h"
-#include "update_engine/clock_interface.h"
-#include "update_engine/constants.h"
+#include "update_engine/common/boot_control_interface.h"
+#include "update_engine/common/certificate_checker.h"
+#include "update_engine/common/clock_interface.h"
+#include "update_engine/common/constants.h"
+#include "update_engine/common/hardware_interface.h"
+#include "update_engine/common/libcurl_http_fetcher.h"
+#include "update_engine/common/multi_range_http_fetcher.h"
+#include "update_engine/common/platform_constants.h"
+#include "update_engine/common/prefs_interface.h"
+#include "update_engine/common/subprocess.h"
+#include "update_engine/common/utils.h"
#include "update_engine/dbus_service.h"
-#include "update_engine/download_action.h"
-#include "update_engine/filesystem_verifier_action.h"
-#include "update_engine/hardware_interface.h"
-#include "update_engine/libcurl_http_fetcher.h"
#include "update_engine/metrics.h"
-#include "update_engine/multi_range_http_fetcher.h"
#include "update_engine/omaha_request_action.h"
#include "update_engine/omaha_request_params.h"
#include "update_engine/omaha_response_handler_action.h"
#include "update_engine/p2p_manager.h"
+#include "update_engine/payload_consumer/download_action.h"
+#include "update_engine/payload_consumer/filesystem_verifier_action.h"
+#include "update_engine/payload_consumer/postinstall_runner_action.h"
#include "update_engine/payload_state_interface.h"
-#include "update_engine/platform_constants.h"
-#include "update_engine/postinstall_runner_action.h"
-#include "update_engine/prefs_interface.h"
-#include "update_engine/subprocess.h"
#include "update_engine/system_state.h"
#include "update_engine/update_manager/policy.h"
#include "update_engine/update_manager/update_manager.h"
#include "update_engine/update_status_utils.h"
-#include "update_engine/utils.h"
using base::Bind;
using base::Callback;