Implement update_engine weave commands

The new WeaveServiceInterface abstracs the registration and interaction
with weave whenever present. The compilation and usage of weave is
based on the BRILLO_USE_WEAVE flag.

When enabled, update_engine registers the "_updater" component with
methods to force-check for an update and change channels.

Bug: 24386758
Bug: 24386768
Test: Deployed on edison, weave commands and state available online.

Change-Id: Ic49111772e123b8a2b1971da92fe65785f186ccd
diff --git a/real_system_state.h b/real_system_state.h
index 8ca1abc..d7ee712 100644
--- a/real_system_state.h
+++ b/real_system_state.h
@@ -38,6 +38,7 @@
 #include "update_engine/shill_proxy.h"
 #include "update_engine/update_attempter.h"
 #include "update_engine/update_manager/update_manager.h"
+#include "update_engine/weave_service_interface.h"
 
 namespace chromeos_update_engine {
 
@@ -92,6 +93,10 @@
     return update_attempter_.get();
   }
 
+  inline WeaveServiceInterface* weave_service() override {
+    return weave_service_.get();
+  }
+
   inline OmahaRequestParams* request_params() override {
     return &request_params_;
   }
@@ -110,6 +115,9 @@
   inline bool system_rebooted() override { return system_rebooted_; }
 
  private:
+  // Reference to the DBus bus.
+  scoped_refptr<dbus::Bus> bus_;
+
   // Real DBus proxies using the DBus connection.
   org::chromium::debugdProxy debugd_proxy_;
   org::chromium::PowerManagerProxy power_manager_proxy_;
@@ -158,6 +166,8 @@
 
   std::unique_ptr<P2PManager> p2p_manager_;
 
+  std::unique_ptr<WeaveServiceInterface> weave_service_;
+
   std::unique_ptr<chromeos_update_manager::UpdateManager> update_manager_;
 
   policy::PolicyProvider policy_provider_;