Switch FileWriter::Write to boolean result code.

FileWriter::Write returned either the number of bytes written, or a negative
error code. No clients were doing anything with the result other than checking
for success or failure, and many clients were considering any non-zero result
success.

So, I changed the API to return less information, but just the information the
clients needed. Success or failure.

BUG=chromium-os:8521
TEST=Unittests

Change-Id: I51513d6aa7b704dc27fb90d5fae4dc7118a3f86c
Reviewed-on: https://gerrit.chromium.org/gerrit/11532
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Commit-Ready: Don Garrett <dgarrett@chromium.org>
10 files changed
tree: 4817e4a17c879df0bdab8849abba9a6ecdd63d03
  1. .gitignore
  2. action.h
  3. action_mock.h
  4. action_pipe.h
  5. action_pipe_unittest.cc
  6. action_processor.cc
  7. action_processor.h
  8. action_processor_mock.h
  9. action_processor_unittest.cc
  10. action_unittest.cc
  11. bzip.cc
  12. bzip.h
  13. bzip_extent_writer.cc
  14. bzip_extent_writer.h
  15. bzip_extent_writer_unittest.cc
  16. certificate_checker.cc
  17. certificate_checker.h
  18. certificate_checker_mock.h
  19. certificate_checker_unittest.cc
  20. chrome_browser_proxy_resolver.cc
  21. chrome_browser_proxy_resolver.h
  22. chrome_browser_proxy_resolver_unittest.cc
  23. chrome_proxy_resolver.cc
  24. chrome_proxy_resolver.h
  25. chrome_proxy_resolver_unittest.cc
  26. cycle_breaker.cc
  27. cycle_breaker.h
  28. cycle_breaker_unittest.cc
  29. dbus_constants.h
  30. dbus_interface.h
  31. dbus_service.cc
  32. dbus_service.h
  33. delta_diff_generator.cc
  34. delta_diff_generator.h
  35. delta_diff_generator_unittest.cc
  36. delta_performer.cc
  37. delta_performer.h
  38. delta_performer_unittest.cc
  39. download_action.cc
  40. download_action.h
  41. download_action_unittest.cc
  42. extent_mapper.cc
  43. extent_mapper.h
  44. extent_mapper_unittest.cc
  45. extent_ranges.cc
  46. extent_ranges.h
  47. extent_ranges_unittest.cc
  48. extent_writer.cc
  49. extent_writer.h
  50. extent_writer_unittest.cc
  51. file_writer.cc
  52. file_writer.h
  53. file_writer_mock.h
  54. file_writer_unittest.cc
  55. filesystem_copier_action.cc
  56. filesystem_copier_action.h
  57. filesystem_copier_action_unittest.cc
  58. filesystem_iterator.cc
  59. filesystem_iterator.h
  60. filesystem_iterator_unittest.cc
  61. flimflam_proxy.cc
  62. flimflam_proxy.h
  63. flimflam_proxy_unittest.cc
  64. full_update_generator.cc
  65. full_update_generator.h
  66. full_update_generator_unittest.cc
  67. gen_coverage_html.sh
  68. generate_delta_main.cc
  69. graph_types.h
  70. graph_utils.cc
  71. graph_utils.h
  72. graph_utils_unittest.cc
  73. http_fetcher.cc
  74. http_fetcher.h
  75. http_fetcher_unittest.cc
  76. inherit-review-settings-ok
  77. install_plan.h
  78. integration_unittest.cc
  79. libcurl_http_fetcher.cc
  80. libcurl_http_fetcher.h
  81. LICENSE
  82. local_coverage_rate.sh
  83. main.cc
  84. marshal.list
  85. metadata.cc
  86. metadata.h
  87. metadata_unittest.cc
  88. mock_dbus_interface.h
  89. mock_file_writer.h
  90. mock_http_fetcher.cc
  91. mock_http_fetcher.h
  92. multi_range_http_fetcher.cc
  93. multi_range_http_fetcher.h
  94. omaha_hash_calculator.cc
  95. omaha_hash_calculator.h
  96. omaha_hash_calculator_unittest.cc
  97. omaha_request_action.cc
  98. omaha_request_action.h
  99. omaha_request_action_unittest.cc
  100. omaha_request_params.cc
  101. omaha_request_params.h
  102. omaha_request_params_unittest.cc
  103. omaha_response_handler_action.cc
  104. omaha_response_handler_action.h
  105. omaha_response_handler_action_unittest.cc
  106. org.chromium.UpdateEngine.service
  107. payload_signer.cc
  108. payload_signer.h
  109. payload_signer_unittest.cc
  110. postinstall_runner_action.cc
  111. postinstall_runner_action.h
  112. postinstall_runner_action_unittest.cc
  113. prefs.cc
  114. prefs.h
  115. prefs_interface.h
  116. prefs_mock.h
  117. prefs_unittest.cc
  118. proxy_resolver.cc
  119. proxy_resolver.h
  120. SConstruct
  121. setup_dev_packages
  122. simple_key_value_store.cc
  123. simple_key_value_store.h
  124. simple_key_value_store_unittest.cc
  125. subprocess.cc
  126. subprocess.h
  127. subprocess_unittest.cc
  128. tarjan.cc
  129. tarjan.h
  130. tarjan_unittest.cc
  131. terminator.cc
  132. terminator.h
  133. terminator_unittest.cc
  134. test_http_server.cc
  135. test_utils.cc
  136. test_utils.h
  137. testrunner.cc
  138. topological_sort.cc
  139. topological_sort.h
  140. topological_sort_unittest.cc
  141. unittest_key.pem
  142. unittest_key2.pem
  143. update_attempter.cc
  144. update_attempter.h
  145. update_attempter_mock.h
  146. update_attempter_unittest.cc
  147. update_check_scheduler.cc
  148. update_check_scheduler.h
  149. update_check_scheduler_unittest.cc
  150. update_engine.xml
  151. update_engine_client.cc
  152. update_metadata.proto
  153. UpdateEngine.conf
  154. utils.cc
  155. utils.h
  156. utils_unittest.cc
  157. WATCHLISTS
  158. zip_unittest.cc