Make Hardware class platform specific.

The Hardware class abstracts the interaction with the actual hardware
which is inherently platform-specific. This patch implementes a stub
version for Android and moves the Chromium OS implementation, handling
both with the same public factory method.

Bug: 23084776
TEST=emerge-link update_engine; `mma -i` builds the stubs.

Change-Id: I19c791a2e3fa22f0ac38bbe68a9c47838bcf019a
11 files changed
tree: 8336dbd896c21fe2f5d8972fff37028652a6be58
  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. boot_control_chromeos.cc
  15. boot_control_chromeos.h
  16. boot_control_chromeos_unittest.cc
  17. boot_control_interface.h
  18. bzip.cc
  19. bzip.h
  20. bzip_extent_writer.cc
  21. bzip_extent_writer.h
  22. bzip_extent_writer_unittest.cc
  23. certificate_checker.cc
  24. certificate_checker.h
  25. certificate_checker_unittest.cc
  26. chrome_browser_proxy_resolver.cc
  27. chrome_browser_proxy_resolver.h
  28. chrome_browser_proxy_resolver_unittest.cc
  29. clock.cc
  30. clock.h
  31. clock_interface.h
  32. connection_manager.cc
  33. connection_manager.h
  34. connection_manager_interface.h
  35. connection_manager_unittest.cc
  36. constants.cc
  37. constants.h
  38. daemon.cc
  39. daemon.h
  40. dbus_constants.h
  41. dbus_service.cc
  42. dbus_service.h
  43. dbus_service_unittest.cc
  44. dbus_test_utils.h
  45. delta_performer.cc
  46. delta_performer.h
  47. delta_performer_unittest.cc
  48. download_action.cc
  49. download_action.h
  50. download_action_unittest.cc
  51. error_code.h
  52. extent_writer.cc
  53. extent_writer.h
  54. extent_writer_unittest.cc
  55. fake_boot_control.h
  56. fake_clock.h
  57. fake_file_writer.h
  58. fake_hardware.h
  59. fake_p2p_manager.h
  60. fake_p2p_manager_configuration.h
  61. fake_prefs.cc
  62. fake_prefs.h
  63. fake_shill_proxy.cc
  64. fake_shill_proxy.h
  65. fake_system_state.cc
  66. fake_system_state.h
  67. file_descriptor.cc
  68. file_descriptor.h
  69. file_writer.cc
  70. file_writer.h
  71. file_writer_unittest.cc
  72. filesystem_verifier_action.cc
  73. filesystem_verifier_action.h
  74. filesystem_verifier_action_unittest.cc
  75. generate_pc_file.sh
  76. hardware.h
  77. hardware_android.cc
  78. hardware_android.h
  79. hardware_chromeos.cc
  80. hardware_chromeos.h
  81. hardware_interface.h
  82. http_common.cc
  83. http_common.h
  84. http_fetcher.cc
  85. http_fetcher.h
  86. http_fetcher_unittest.cc
  87. hwid_override.cc
  88. hwid_override.h
  89. hwid_override_unittest.cc
  90. install_plan.cc
  91. install_plan.h
  92. libcros_proxy.cc
  93. libcros_proxy.h
  94. libcurl_http_fetcher.cc
  95. libcurl_http_fetcher.h
  96. libupdate_engine-client-test.pc.in
  97. libupdate_engine-client.pc.in
  98. local_coverage_rate
  99. main.cc
  100. metrics.cc
  101. metrics.h
  102. mock_action.h
  103. mock_action_processor.h
  104. mock_certificate_checker.h
  105. mock_connection_manager.h
  106. mock_file_writer.h
  107. mock_hardware.h
  108. mock_http_fetcher.cc
  109. mock_http_fetcher.h
  110. mock_omaha_request_params.h
  111. mock_p2p_manager.h
  112. mock_payload_state.h
  113. mock_prefs.h
  114. mock_update_attempter.h
  115. MODULE_LICENSE_APACHE2
  116. mtd_file_descriptor.cc
  117. mtd_file_descriptor.h
  118. multi_range_http_fetcher.cc
  119. multi_range_http_fetcher.h
  120. NOTICE
  121. omaha_hash_calculator.cc
  122. omaha_hash_calculator.h
  123. omaha_hash_calculator_unittest.cc
  124. omaha_request_action.cc
  125. omaha_request_action.h
  126. omaha_request_action_unittest.cc
  127. omaha_request_params.cc
  128. omaha_request_params.h
  129. omaha_request_params_unittest.cc
  130. omaha_response.h
  131. omaha_response_handler_action.cc
  132. omaha_response_handler_action.h
  133. omaha_response_handler_action_unittest.cc
  134. OWNERS
  135. p2p_manager.cc
  136. p2p_manager.h
  137. p2p_manager_unittest.cc
  138. payload_constants.cc
  139. payload_constants.h
  140. payload_state.cc
  141. payload_state.h
  142. payload_state_interface.h
  143. payload_state_unittest.cc
  144. payload_verifier.cc
  145. payload_verifier.h
  146. postinstall_runner_action.cc
  147. postinstall_runner_action.h
  148. postinstall_runner_action_unittest.cc
  149. prefs.cc
  150. prefs.h
  151. prefs_interface.h
  152. prefs_unittest.cc
  153. PRESUBMIT.cfg
  154. proxy_resolver.cc
  155. proxy_resolver.h
  156. real_system_state.cc
  157. real_system_state.h
  158. run_unittests
  159. sample_omaha_v3_response.xml
  160. shill_proxy.cc
  161. shill_proxy.h
  162. shill_proxy_interface.h
  163. subprocess.cc
  164. subprocess.h
  165. subprocess_unittest.cc
  166. system_state.h
  167. tar_bunzip2.gypi
  168. terminator.cc
  169. terminator.h
  170. terminator_unittest.cc
  171. test_http_server.cc
  172. test_utils.cc
  173. test_utils.h
  174. test_utils_unittest.cc
  175. testrunner.cc
  176. unittest_key.pem
  177. unittest_key2.pem
  178. update_attempter.cc
  179. update_attempter.h
  180. update_attempter_unittest.cc
  181. update_engine-client.gyp
  182. update_engine.conf
  183. update_engine.gyp
  184. update_engine_client.cc
  185. update_metadata.proto
  186. UpdateEngine.conf
  187. utils.cc
  188. utils.h
  189. utils_unittest.cc
  190. WATCHLISTS
  191. zip_unittest.cc