AU: Update Downloader to support our image formats.

The downloader used to be dumb in the sense that it would pipe output
to either a DirectFileWriter or a DirectFileWriter via a
GzipDecompressingFileWriter, depending on if we were downloading an
update that was compressed or not. Sadly, things have gotten more
complex: we need to download to two partitions (kernel + rootfs), and
we may stream data via a DeltaPerformer (a type of FileWriter) to the
disk. Thus, the Downloader streams to either
1. gzip decompress->split_writer->direct to disk OR
2. delta performer

Other misc changes: Change FilesystemCopierAction to support
optionally copying the kernel partition rather than root partition.

InstallPlan struct: add an entry for destiation kernel partition.

Test Utils: a new ScopedTempFile class

Utils: support for getting the booted kernel partition device.

BUG=None
TEST=attached unittests

Review URL: http://codereview.chromium.org/1694025
13 files changed
tree: a506d9e7f753cdc185ef974aea4330a980000f91
  1. action.h
  2. action_pipe.h
  3. action_pipe_unittest.cc
  4. action_processor.cc
  5. action_processor.h
  6. action_processor_unittest.cc
  7. action_unittest.cc
  8. bzip.cc
  9. bzip.h
  10. bzip_extent_writer.cc
  11. bzip_extent_writer.h
  12. bzip_extent_writer_unittest.cc
  13. cycle_breaker.cc
  14. cycle_breaker.h
  15. cycle_breaker_unittest.cc
  16. dbus_constants.h
  17. dbus_service.cc
  18. dbus_service.h
  19. decompressing_file_writer.cc
  20. decompressing_file_writer.h
  21. decompressing_file_writer_unittest.cc
  22. delta_diff_generator.cc
  23. delta_diff_generator.h
  24. delta_diff_generator_unittest.cc
  25. delta_performer.cc
  26. delta_performer.h
  27. delta_performer_unittest.cc
  28. download_action.cc
  29. download_action.h
  30. download_action_unittest.cc
  31. extent_mapper.cc
  32. extent_mapper.h
  33. extent_mapper_unittest.cc
  34. extent_writer.cc
  35. extent_writer.h
  36. extent_writer_unittest.cc
  37. file_writer.cc
  38. file_writer.h
  39. file_writer_unittest.cc
  40. filesystem_copier_action.cc
  41. filesystem_copier_action.h
  42. filesystem_copier_action_unittest.cc
  43. filesystem_iterator.cc
  44. filesystem_iterator.h
  45. filesystem_iterator_unittest.cc
  46. gen_coverage_html.sh
  47. generate_delta_main.cc
  48. graph_types.h
  49. graph_utils.cc
  50. graph_utils.h
  51. graph_utils_unittest.cc
  52. gzip.cc
  53. gzip.h
  54. http_fetcher.h
  55. http_fetcher_unittest.cc
  56. install_plan.h
  57. integration_unittest.cc
  58. libcurl_http_fetcher.cc
  59. libcurl_http_fetcher.h
  60. local_coverage_rate.sh
  61. main.cc
  62. mock_file_writer.h
  63. mock_http_fetcher.cc
  64. mock_http_fetcher.h
  65. omaha_hash_calculator.cc
  66. omaha_hash_calculator.h
  67. omaha_hash_calculator_unittest.cc
  68. omaha_request_prep_action.cc
  69. omaha_request_prep_action.h
  70. omaha_request_prep_action_unittest.cc
  71. omaha_response_handler_action.cc
  72. omaha_response_handler_action.h
  73. omaha_response_handler_action_unittest.cc
  74. org.chromium.UpdateEngine.service
  75. postinstall_runner_action.cc
  76. postinstall_runner_action.h
  77. postinstall_runner_action_unittest.cc
  78. SConstruct
  79. set_bootable_flag_action.cc
  80. set_bootable_flag_action.h
  81. set_bootable_flag_action_unittest.cc
  82. split_file_writer.cc
  83. split_file_writer.h
  84. split_file_writer_unittest.cc
  85. subprocess.cc
  86. subprocess.h
  87. subprocess_unittest.cc
  88. tarjan.cc
  89. tarjan.h
  90. tarjan_unittest.cc
  91. test_http_server.cc
  92. test_http_server.py
  93. test_utils.cc
  94. test_utils.h
  95. testrunner.cc
  96. topological_sort.cc
  97. topological_sort.h
  98. topological_sort_unittest.cc
  99. update_attempter.cc
  100. update_attempter.h
  101. update_check_action.cc
  102. update_check_action.h
  103. update_check_action_unittest.cc
  104. update_engine.xml
  105. update_engine_client.cc
  106. update_metadata.proto
  107. UpdateEngine.conf
  108. utils.cc
  109. utils.h
  110. utils_unittest.cc
  111. zip_unittest.cc