update_engine: Migrate UE DBus service to chrome DBus bindings.

chromeos-dbus-bindings now generates the adaptor interface that
update_engine exposes over DBus. This interface is implemented in
dbus_service.{h,cc}, which now has a UpdateEngineService class
encapsulating all the service methods implementation.

This allows to write unit test for those methods, which are included
in this CL for all the non-trivial methods.

This CL now uses chrome's DBus bindings for the update_engine serive,
but the proxy interaction is still done using dbus-glib. The main loop
in the main.cc file is now replaced with the chromeos::Dameon, which
uses a chromeos::BaseMessageLoop instead of a GlibMessageLoop. This
causes the asynchronous interactions in the proxy side to not work,
which will be fixed in the next CL.

CQ-DEPEND=CL:290990,CL:291092,CL:293334
BUG=chromium:419827
TEST=Added unittest for all dbus_service methods. deployed and tested manually that update_engine dbus interface works.

Change-Id: I6a6d142b2ac1a61a4c3abcb927665b26114abe5c
Reviewed-on: https://chromium-review.googlesource.com/225324
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
16 files changed
tree: ecf4d15bb7139f455a879cecd81f57c4c0c50988
  1. dbus_bindings/
  2. init/
  3. payload_generator/
  4. sample_images/
  5. update_manager/
  6. .gitignore
  7. action.h
  8. action_pipe.h
  9. action_pipe_unittest.cc
  10. action_processor.cc
  11. action_processor.h
  12. action_processor_unittest.cc
  13. action_unittest.cc
  14. bzip.cc
  15. bzip.h
  16. bzip_extent_writer.cc
  17. bzip_extent_writer.h
  18. bzip_extent_writer_unittest.cc
  19. certificate_checker.cc
  20. certificate_checker.h
  21. certificate_checker_unittest.cc
  22. chrome_browser_proxy_resolver.cc
  23. chrome_browser_proxy_resolver.h
  24. chrome_browser_proxy_resolver_unittest.cc
  25. clock.cc
  26. clock.h
  27. clock_interface.h
  28. connection_manager.cc
  29. connection_manager.h
  30. connection_manager_interface.h
  31. connection_manager_unittest.cc
  32. constants.cc
  33. constants.h
  34. daemon.cc
  35. daemon.h
  36. dbus_constants.h
  37. dbus_service.cc
  38. dbus_service.h
  39. dbus_service_unittest.cc
  40. dbus_wrapper_interface.h
  41. delta_performer.cc
  42. delta_performer.h
  43. delta_performer_unittest.cc
  44. download_action.cc
  45. download_action.h
  46. download_action_unittest.cc
  47. error_code.h
  48. extent_writer.cc
  49. extent_writer.h
  50. extent_writer_unittest.cc
  51. fake_clock.h
  52. fake_file_writer.h
  53. fake_hardware.h
  54. fake_p2p_manager.h
  55. fake_p2p_manager_configuration.h
  56. fake_prefs.cc
  57. fake_prefs.h
  58. fake_system_state.cc
  59. fake_system_state.h
  60. file_descriptor.cc
  61. file_descriptor.h
  62. file_writer.cc
  63. file_writer.h
  64. file_writer_unittest.cc
  65. filesystem_verifier_action.cc
  66. filesystem_verifier_action.h
  67. filesystem_verifier_action_unittest.cc
  68. generate_image.gypi
  69. glib_utils.cc
  70. glib_utils.h
  71. hardware.cc
  72. hardware.h
  73. hardware_interface.h
  74. http_common.cc
  75. http_common.h
  76. http_fetcher.cc
  77. http_fetcher.h
  78. http_fetcher_unittest.cc
  79. hwid_override.cc
  80. hwid_override.h
  81. hwid_override_unittest.cc
  82. install_plan.cc
  83. install_plan.h
  84. libcurl_http_fetcher.cc
  85. libcurl_http_fetcher.h
  86. local_coverage_rate
  87. main.cc
  88. metrics.cc
  89. metrics.h
  90. mock_action.h
  91. mock_action_processor.h
  92. mock_certificate_checker.h
  93. mock_connection_manager.h
  94. mock_dbus_wrapper.h
  95. mock_file_writer.h
  96. mock_hardware.h
  97. mock_http_fetcher.cc
  98. mock_http_fetcher.h
  99. mock_omaha_request_params.h
  100. mock_p2p_manager.h
  101. mock_payload_state.h
  102. mock_prefs.h
  103. mock_update_attempter.h
  104. mtd_file_descriptor.cc
  105. mtd_file_descriptor.h
  106. multi_range_http_fetcher.cc
  107. multi_range_http_fetcher.h
  108. omaha_hash_calculator.cc
  109. omaha_hash_calculator.h
  110. omaha_hash_calculator_unittest.cc
  111. omaha_request_action.cc
  112. omaha_request_action.h
  113. omaha_request_action_unittest.cc
  114. omaha_request_params.cc
  115. omaha_request_params.h
  116. omaha_request_params_unittest.cc
  117. omaha_response.h
  118. omaha_response_handler_action.cc
  119. omaha_response_handler_action.h
  120. omaha_response_handler_action_unittest.cc
  121. OWNERS
  122. p2p_manager.cc
  123. p2p_manager.h
  124. p2p_manager_unittest.cc
  125. payload_constants.cc
  126. payload_constants.h
  127. payload_state.cc
  128. payload_state.h
  129. payload_state_interface.h
  130. payload_state_unittest.cc
  131. payload_verifier.cc
  132. payload_verifier.h
  133. postinstall_runner_action.cc
  134. postinstall_runner_action.h
  135. postinstall_runner_action_unittest.cc
  136. prefs.cc
  137. prefs.h
  138. prefs_interface.h
  139. prefs_unittest.cc
  140. proxy_resolver.cc
  141. proxy_resolver.h
  142. real_dbus_wrapper.h
  143. real_system_state.cc
  144. real_system_state.h
  145. run_unittests
  146. sample_omaha_v3_response.xml
  147. subprocess.cc
  148. subprocess.h
  149. subprocess_unittest.cc
  150. system_state.h
  151. terminator.cc
  152. terminator.h
  153. terminator_unittest.cc
  154. test_http_server.cc
  155. test_utils.cc
  156. test_utils.h
  157. test_utils_unittest.cc
  158. testrunner.cc
  159. unittest_key.pem
  160. unittest_key2.pem
  161. update_attempter.cc
  162. update_attempter.h
  163. update_attempter_unittest.cc
  164. update_engine.conf
  165. update_engine.gyp
  166. update_engine_client.cc
  167. update_metadata.proto
  168. UpdateEngine.conf
  169. utils.cc
  170. utils.h
  171. utils_unittest.cc
  172. WATCHLISTS
  173. zip_unittest.cc