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_engine.gyp b/update_engine.gyp
index b7aaa9d..c6250af 100644
--- a/update_engine.gyp
+++ b/update_engine.gyp
@@ -26,6 +26,7 @@
'USE_binder%': '0',
'USE_dbus%': '1',
'USE_hwid_override%': '0',
+ 'USE_libcros%': '1',
'USE_mtd%': '0',
'USE_power_management%': '0',
'USE_buffet%': '0',
@@ -52,6 +53,7 @@
'USE_BINDER=<(USE_binder)',
'USE_DBUS=<(USE_dbus)',
'USE_HWID_OVERRIDE=<(USE_hwid_override)',
+ 'USE_LIBCROS=<(USE_libcros)',
'USE_MTD=<(USE_mtd)',
'USE_POWER_MANAGEMENT=<(USE_power_management)',
'USE_WEAVE=<(USE_buffet)',
@@ -246,7 +248,6 @@
},
'sources': [
'boot_control_chromeos.cc',
- 'chrome_browser_proxy_resolver.cc',
'common_service.cc',
'connection_manager.cc',
'daemon.cc',
@@ -293,6 +294,14 @@
],
},
}],
+ ['USE_libcros == 1', {
+ 'dependencies': [
+ 'update_engine-other-dbus-proxies',
+ ],
+ 'sources': [
+ 'chrome_browser_proxy_resolver.cc',
+ ],
+ }],
],
},
# update_engine daemon.
@@ -468,7 +477,6 @@
'includes': ['../../../platform2/common-mk/common_test.gypi'],
'sources': [
'boot_control_chromeos_unittest.cc',
- 'chrome_browser_proxy_resolver_unittest.cc',
'common/action_pipe_unittest.cc',
'common/action_processor_unittest.cc',
'common/action_unittest.cc',
@@ -540,6 +548,13 @@
# Main entry point for runnning tests.
'testrunner.cc',
],
+ 'conditions': [
+ ['USE_libcros == 1', {
+ 'sources': [
+ 'chrome_browser_proxy_resolver_unittest.cc',
+ ],
+ }],
+ ],
},
],
}],