Disable ChromeBrowserProxyResolver behind a flag.
In Brillo and Android targets, there isn't a Chrome instance running
to resolve the proxies for a given URL. While this is not a fatal error
it logs abundant error messages on each request, confusing developers.
This patch compiles the ChromeBrowserProxyResolver only when the
USE_LIBCROS flag is set. This is now disabled by default in Brillo and
Android, but enabled in Chrome OS.
Bug: 24277309
TEST=`mma` on edison-eng. Applied an update, no more proxy error logs.
Change-Id: I27779572bf2fc810cb7846d63e123643d0386b0a
diff --git a/update_attempter.cc b/update_attempter.cc
index aeb433b..b67fcb3 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -125,7 +125,9 @@
: processor_(new ActionProcessor()),
system_state_(system_state),
cert_checker_(cert_checker),
+#if USE_LIBCROS
chrome_proxy_resolver_(libcros_proxy),
+#endif // USE_LIBCROS
debugd_proxy_(debugd_proxy) {
}
@@ -155,7 +157,9 @@
else
status_ = UpdateStatus::IDLE;
+#if USE_LIBCROS
chrome_proxy_resolver_.Init();
+#endif // USE_LIBCROS
}
void UpdateAttempter::ScheduleUpdates() {