update_engine: Switch to chrome-dbus for client requests in update_engine
update_engine daemon acts as DBus client to send DBus calls to shill,
power_manager and chrome, and to listen for signals from shill, chrome
and login_manager. This patch migrates these calls and signals to use
chrome-dbus framework instead of dbus-glib.
All references to dbus-glib code are removed.
BUG=chromium:419827
TEST=Updated unittest. Deployed on a link device and tested interactions with shill and chromium.
Change-Id: I31b389e0d1690cccb115ff3b6539c876ba81bd0e
Reviewed-on: https://chromium-review.googlesource.com/290990
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
diff --git a/update_engine.gyp b/update_engine.gyp
index 1ddb4d9..1482877 100644
--- a/update_engine.gyp
+++ b/update_engine.gyp
@@ -77,11 +77,11 @@
'type': 'static_library',
'dependencies': [
'update_metadata-protos',
+ 'update_engine-dbus-adaptor',
],
'variables': {
'exported_deps': [
'dbus-1',
- 'dbus-glib-1',
'glib-2.0',
'libchrome-<(libbase_ver)',
'libchromeos-<(libbase_ver)',
@@ -131,12 +131,12 @@
'file_descriptor.cc',
'file_writer.cc',
'filesystem_verifier_action.cc',
- 'glib_utils.cc',
'hardware.cc',
'http_common.cc',
'http_fetcher.cc',
'hwid_override.cc',
'install_plan.cc',
+ 'libcros_proxy.cc',
'libcurl_http_fetcher.cc',
'metrics.cc',
'multi_range_http_fetcher.cc',
@@ -152,6 +152,7 @@
'prefs.cc',
'proxy_resolver.cc',
'real_system_state.cc',
+ 'shill_proxy.cc',
'subprocess.cc',
'terminator.cc',
'update_attempter.cc',
@@ -171,6 +172,25 @@
'update_manager/update_manager.cc',
'utils.cc',
],
+ 'actions': [
+ {
+ 'action_name': 'update_engine-dbus-proxies',
+ 'variables': {
+ 'dbus_service_config': '',
+ 'mock_output_file': 'include/update_engine/dbus_mocks.h',
+ 'proxy_output_file': 'include/update_engine/dbus_proxies.h'
+ },
+ 'sources': [
+ '../debugd/share/org.chromium.debugd.xml',
+ '../login_manager/org.chromium.SessionManagerInterface.xml',
+ '../power_manager/dbus_bindings/org.chromium.PowerManager.xml',
+ '../shill/dbus_bindings/org.chromium.flimflam.Manager.xml',
+ '../shill/dbus_bindings/org.chromium.flimflam.Service.xml',
+ 'dbus_bindings/org.chromium.LibCrosService.xml',
+ ],
+ 'includes': ['../common-mk/generate-dbus-proxies.gypi'],
+ },
+ ],
'conditions': [
['USE_mtd == 1', {
'sources': [
@@ -190,7 +210,6 @@
'type': 'executable',
'dependencies': [
'libupdate_engine',
- 'update_engine-dbus-adaptor',
],
'sources': [
'main.cc',
@@ -219,10 +238,10 @@
],
'actions': [
{
- 'action_name': 'update_engine-dbus-proxies',
+ 'action_name': 'update_engine_client-dbus-proxies',
'variables': {
'dbus_service_config': 'dbus_bindings/dbus-service-config.json',
- 'proxy_output_file': 'include/update_engine/dbus_proxies.h'
+ 'proxy_output_file': 'include/update_engine/client_dbus_proxies.h'
},
'sources': [
'dbus_bindings/org.chromium.UpdateEngineInterface.xml',
@@ -373,6 +392,7 @@
'download_action_unittest.cc',
'extent_writer_unittest.cc',
'fake_prefs.cc',
+ 'fake_shill_proxy.cc',
'fake_system_state.cc',
'file_writer_unittest.cc',
'filesystem_verifier_action_unittest.cc',