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/update_attempter.cc b/update_attempter.cc
index 55ef948..4b7a294 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -35,6 +35,7 @@
#include <brillo/make_unique_ptr.h>
#include <brillo/message_loops/message_loop.h>
#include <debugd/dbus-constants.h>
+#include <debugd/dbus-proxies.h>
#include <policy/device_policy.h>
#include <policy/libpolicy.h>
#include <power_manager/dbus-constants.h>
@@ -125,13 +126,14 @@
UpdateAttempter::UpdateAttempter(
SystemState* system_state,
CertificateChecker* cert_checker,
- LibCrosProxy* libcros_proxy,
+ org::chromium::NetworkProxyServiceInterfaceProxyInterface*
+ network_proxy_service_proxy,
org::chromium::debugdProxyInterface* debugd_proxy)
: processor_(new ActionProcessor()),
system_state_(system_state),
cert_checker_(cert_checker),
#if USE_LIBCROS
- chrome_proxy_resolver_(libcros_proxy),
+ chrome_proxy_resolver_(network_proxy_service_proxy),
#endif // USE_LIBCROS
debugd_proxy_(debugd_proxy) {
}
@@ -161,10 +163,6 @@
status_ = UpdateStatus::UPDATED_NEED_REBOOT;
else
status_ = UpdateStatus::IDLE;
-
-#if USE_LIBCROS
- chrome_proxy_resolver_.Init();
-#endif // USE_LIBCROS
}
void UpdateAttempter::ScheduleUpdates() {