Move current daemon destruction logic to RealSystemState.
The UpdateAttempter requires to release the dbus_adaptor pointer
before detruction to avoid sending messages over a dead DBus connection.
This patch moves this logic out of the UpdateEngineDaemon class.
Bug: None
TEST=mm; Tested on Brillo.
Change-Id: I8939c5a2940f435e2e8f574910e0fa2674dc725f
diff --git a/real_system_state.h b/real_system_state.h
index 3aaa9ec..a1fe8c6 100644
--- a/real_system_state.h
+++ b/real_system_state.h
@@ -49,6 +49,7 @@
// Constructs all system objects that do not require separate initialization;
// see Initialize() below for the remaining ones.
explicit RealSystemState(const scoped_refptr<dbus::Bus>& bus);
+ ~RealSystemState() override;
// Initializes and sets systems objects that require an initialization
// separately from construction. Returns |true| on success.