Make DBus a singleton.
All the proxies need dbus to initialize, so we are passing dbus around,
to make it easier to compile dbus conditionally, this patch makes it a
singleton so that the proxies can get dbus on their own.
Test: mma
Bug: 28800946
Change-Id: Idf062c843aa34a431c2201bae5b895dc1d0ea787
diff --git a/daemon.h b/daemon.h
index faf957a..5910783 100644
--- a/daemon.h
+++ b/daemon.h
@@ -24,9 +24,6 @@
#include <brillo/binder_watcher.h>
#endif // USE_WEAVE || USE_BINDER
#include <brillo/daemons/daemon.h>
-#if USE_DBUS
-#include <brillo/dbus/dbus_connection.h>
-#endif // USE_DBUS
#if USE_BINDER
#if USE_OMAHA
@@ -57,8 +54,7 @@
// initialization.
void OnDBusRegistered(bool succeeded);
- // Main D-Bus connection and service adaptor.
- brillo::DBusConnection dbus_connection_;
+ // Main D-Bus service adaptor.
std::unique_ptr<UpdateEngineAdaptor> dbus_adaptor_;
#endif // USE_DBUS