update_engine: Migrate UE DBus service to chrome DBus bindings.
chromeos-dbus-bindings now generates the adaptor interface that
update_engine exposes over DBus. This interface is implemented in
dbus_service.{h,cc}, which now has a UpdateEngineService class
encapsulating all the service methods implementation.
This allows to write unit test for those methods, which are included
in this CL for all the non-trivial methods.
This CL now uses chrome's DBus bindings for the update_engine serive,
but the proxy interaction is still done using dbus-glib. The main loop
in the main.cc file is now replaced with the chromeos::Dameon, which
uses a chromeos::BaseMessageLoop instead of a GlibMessageLoop. This
causes the asynchronous interactions in the proxy side to not work,
which will be fixed in the next CL.
CQ-DEPEND=CL:290990,CL:291092,CL:293334
BUG=chromium:419827
TEST=Added unittest for all dbus_service methods. deployed and tested manually that update_engine dbus interface works.
Change-Id: I6a6d142b2ac1a61a4c3abcb927665b26114abe5c
Reviewed-on: https://chromium-review.googlesource.com/225324
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/subprocess.h b/subprocess.h
index c26ea60..775b95f 100644
--- a/subprocess.h
+++ b/subprocess.h
@@ -15,7 +15,7 @@
#include <base/callback.h>
#include <base/logging.h>
#include <base/macros.h>
-#include <chromeos/asynchronous_signal_handler.h>
+#include <chromeos/asynchronous_signal_handler_interface.h>
#include <chromeos/message_loops/message_loop.h>
#include <chromeos/process.h>
#include <chromeos/process_reaper.h>
@@ -49,7 +49,7 @@
~Subprocess();
// Initialize and register the Subprocess singleton.
- void Init();
+ void Init(chromeos::AsynchronousSignalHandlerInterface* async_signal_handler);
// Launches a process in the background and calls the passed |callback| when
// the process exits.
@@ -119,7 +119,6 @@
std::map<pid_t, std::unique_ptr<SubprocessRecord>> subprocess_records_;
// Used to watch for child processes.
- chromeos::AsynchronousSignalHandler async_signal_handler_;
chromeos::ProcessReaper process_reaper_;
DISALLOW_COPY_AND_ASSIGN(Subprocess);