AU: Delta Performer: properly detect idempotent operations

Idempotent operations can be restarted after being aborted. This CL
enables the delta performer to find many idempotent operations. The
algorithm given is pretty good, tho it may incorrectly mark some
idempotent operations as non-idempotent. For example, a BSDIFF
operation may write a block that it reads with the same data; that's
idempotent, but missed by this algorithm. This function just looks to
see if the src/dst blocks are non-intersecting and, if non
intersecting, declares it idempotent.

BUG=7394
TEST=unittest

Review URL: http://codereview.chromium.org/3591019
3 files changed
tree: dc081dfc2080ade2e3ca8a1b7bffc4aef5694143
  1. certs/
  2. .gitignore
  3. action.h
  4. action_mock.h
  5. action_pipe.h
  6. action_pipe_unittest.cc
  7. action_processor.cc
  8. action_processor.h
  9. action_processor_mock.h
  10. action_processor_unittest.cc
  11. action_unittest.cc
  12. buffered_file_writer.cc
  13. buffered_file_writer.h
  14. buffered_file_writer_unittest.cc
  15. bzip.cc
  16. bzip.h
  17. bzip_extent_writer.cc
  18. bzip_extent_writer.h
  19. bzip_extent_writer_unittest.cc
  20. cycle_breaker.cc
  21. cycle_breaker.h
  22. cycle_breaker_unittest.cc
  23. dbus_constants.h
  24. dbus_service.cc
  25. dbus_service.h
  26. decompressing_file_writer.cc
  27. decompressing_file_writer.h
  28. decompressing_file_writer_unittest.cc
  29. delta_diff_generator.cc
  30. delta_diff_generator.h
  31. delta_diff_generator_unittest.cc
  32. delta_performer.cc
  33. delta_performer.h
  34. delta_performer_unittest.cc
  35. download_action.cc
  36. download_action.h
  37. download_action_unittest.cc
  38. extent_mapper.cc
  39. extent_mapper.h
  40. extent_mapper_unittest.cc
  41. extent_ranges.cc
  42. extent_ranges.h
  43. extent_ranges_unittest.cc
  44. extent_writer.cc
  45. extent_writer.h
  46. extent_writer_unittest.cc
  47. file_writer.cc
  48. file_writer.h
  49. file_writer_mock.h
  50. file_writer_unittest.cc
  51. filesystem_copier_action.cc
  52. filesystem_copier_action.h
  53. filesystem_copier_action_unittest.cc
  54. filesystem_iterator.cc
  55. filesystem_iterator.h
  56. filesystem_iterator_unittest.cc
  57. gen_coverage_html.sh
  58. generate_delta_main.cc
  59. graph_types.h
  60. graph_utils.cc
  61. graph_utils.h
  62. graph_utils_unittest.cc
  63. gzip.cc
  64. gzip.h
  65. http_fetcher.h
  66. http_fetcher_unittest.cc
  67. inherit-review-settings-ok
  68. install_plan.h
  69. integration_unittest.cc
  70. libcurl_http_fetcher.cc
  71. libcurl_http_fetcher.h
  72. LICENSE
  73. local_coverage_rate.sh
  74. main.cc
  75. marshal.list
  76. mock_file_writer.h
  77. mock_http_fetcher.cc
  78. mock_http_fetcher.h
  79. multi_http_fetcher.h
  80. omaha_hash_calculator.cc
  81. omaha_hash_calculator.h
  82. omaha_hash_calculator_unittest.cc
  83. omaha_request_action.cc
  84. omaha_request_action.h
  85. omaha_request_action_unittest.cc
  86. omaha_request_params.cc
  87. omaha_request_params.h
  88. omaha_request_params_unittest.cc
  89. omaha_response_handler_action.cc
  90. omaha_response_handler_action.h
  91. omaha_response_handler_action_unittest.cc
  92. org.chromium.UpdateEngine.service
  93. payload_signer.cc
  94. payload_signer.h
  95. payload_signer_unittest.cc
  96. postinstall_runner_action.cc
  97. postinstall_runner_action.h
  98. postinstall_runner_action_unittest.cc
  99. prefs.cc
  100. prefs.h
  101. prefs_interface.h
  102. prefs_mock.h
  103. prefs_unittest.cc
  104. SConstruct
  105. set_bootable_flag_action.cc
  106. set_bootable_flag_action.h
  107. set_bootable_flag_action_unittest.cc
  108. setup_dev_packages
  109. simple_key_value_store.cc
  110. simple_key_value_store.h
  111. simple_key_value_store_unittest.cc
  112. split_file_writer.cc
  113. split_file_writer.h
  114. split_file_writer_unittest.cc
  115. subprocess.cc
  116. subprocess.h
  117. subprocess_unittest.cc
  118. tarjan.cc
  119. tarjan.h
  120. tarjan_unittest.cc
  121. terminator.cc
  122. terminator.h
  123. test_http_server.cc
  124. test_http_server.py
  125. test_utils.cc
  126. test_utils.h
  127. testrunner.cc
  128. topological_sort.cc
  129. topological_sort.h
  130. topological_sort_unittest.cc
  131. unittest_key.pem
  132. update_attempter.cc
  133. update_attempter.h
  134. update_attempter_mock.h
  135. update_attempter_unittest.cc
  136. update_check_scheduler.cc
  137. update_check_scheduler.h
  138. update_check_scheduler_unittest.cc
  139. update_engine.xml
  140. update_engine_client.cc
  141. update_metadata.proto
  142. UpdateEngine.conf
  143. utils.cc
  144. utils.h
  145. utils_unittest.cc
  146. WATCHLISTS
  147. zip_unittest.cc