update_engine: Use org.chromium.NetworkProxyService.

Make update_engine call Chrome's new
org.chromium.NetworkProxyService D-Bus service to resolve
network proxies instead of using
org.chromium.LibCrosService. The new service supports
asynchronous replies instead of responding via D-Bus
signals.

BUG=chromium:446115,chromium:703217
TEST=unit tests pass; also added debug logging and verified
     that chrome's proxy settings are used

Change-Id: Iebd268ea3e551c0760416d955828b9d7ebf851fb
Reviewed-on: https://chromium-review.googlesource.com/497491
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
diff --git a/real_system_state.cc b/real_system_state.cc
index 8a5f389..74921e2 100644
--- a/real_system_state.cc
+++ b/real_system_state.cc
@@ -24,6 +24,7 @@
 #include <base/time/time.h>
 #include <brillo/make_unique_ptr.h>
 #include <brillo/message_loops/message_loop.h>
+#include <chromeos/dbus/service_constants.h>
 
 #include "update_engine/common/boot_control.h"
 #include "update_engine/common/boot_control_stub.h"
@@ -39,10 +40,11 @@
 
 RealSystemState::RealSystemState(const scoped_refptr<dbus::Bus>& bus)
     : debugd_proxy_(bus),
+      libcros_proxy_(bus, chromeos::kLibCrosServiceName),
+      network_proxy_service_proxy_(bus, chromeos::kNetworkProxyServiceName),
       power_manager_proxy_(bus),
       session_manager_proxy_(bus),
-      shill_proxy_(bus),
-      libcros_proxy_(bus) {
+      shill_proxy_(bus) {
 }
 
 RealSystemState::~RealSystemState() {
@@ -131,9 +133,9 @@
   certificate_checker_->Init();
 
   // Initialize the UpdateAttempter before the UpdateManager.
-  update_attempter_.reset(
-      new UpdateAttempter(this, certificate_checker_.get(), &libcros_proxy_,
-                          &debugd_proxy_));
+  update_attempter_.reset(new UpdateAttempter(this, certificate_checker_.get(),
+                                              &network_proxy_service_proxy_,
+                                              &debugd_proxy_));
   update_attempter_->Init();
 
   weave_service_ = ConstructWeaveService(update_attempter_.get());