[Zucchini] Move Zucchini from /chrome/installer/ to /components/.

(Use "git log --follow" to see older revisions of files).

/components/ is the most logical place to put Zucchini, which only
depends on /base and /testing/gtest. This move also enables Zucchini to
be used by the Component Updater. Details:
- Move all files; run the following to change deps and guards:
  sed 's/chrome\/installer/components/' *.cc *.h -i
  sed 's/CHROME_INSTALLER/COMPONENTS/' *.cc *.h -i
  - Sorting works out pretty well!
- Change all 'chrome/installer/zucchini' to 'components/zucchini'
  throughout other parts of the repo; sort if necessary.
- Fix 6 'git cl lint' errors.
- Change 1 Bind() usage to BindRepeated().
- Update OWNER.

Bug: 729154
Change-Id: I50c5a7d411ea85f707b5994ab319dfb2a1acccf7
Reviewed-on: https://chromium-review.googlesource.com/954923
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Samuel Huang <huangs@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542857}
NOKEYCHECK=True
GitOrigin-RevId: 577ef6c435e8d43be6e3e60ccbcbd1881780f4ec
diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644
index 0000000..47eef3a
--- /dev/null
+++ b/BUILD.gn
@@ -0,0 +1,195 @@
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//chrome/process_version_rc_template.gni")
+import("//testing/libfuzzer/fuzzer_test.gni")
+import("//testing/test.gni")
+
+static_library("zucchini_lib") {
+  sources = [
+    "abs32_utils.cc",
+    "abs32_utils.h",
+    "address_translator.cc",
+    "address_translator.h",
+    "algorithm.h",
+    "binary_data_histogram.cc",
+    "binary_data_histogram.h",
+    "buffer_sink.cc",
+    "buffer_sink.h",
+    "buffer_source.cc",
+    "buffer_source.h",
+    "buffer_view.h",
+    "crc32.cc",
+    "crc32.h",
+    "disassembler.cc",
+    "disassembler.h",
+    "disassembler_no_op.cc",
+    "disassembler_no_op.h",
+    "disassembler_win32.cc",
+    "disassembler_win32.h",
+    "element_detection.cc",
+    "element_detection.h",
+    "encoded_view.cc",
+    "encoded_view.h",
+    "ensemble_matcher.cc",
+    "ensemble_matcher.h",
+    "equivalence_map.cc",
+    "equivalence_map.h",
+    "heuristic_ensemble_matcher.cc",
+    "heuristic_ensemble_matcher.h",
+    "image_index.cc",
+    "image_index.h",
+    "image_utils.h",
+    "io_utils.cc",
+    "io_utils.h",
+    "label_manager.cc",
+    "label_manager.h",
+    "patch_reader.cc",
+    "patch_reader.h",
+    "patch_utils.h",
+    "patch_writer.cc",
+    "patch_writer.h",
+    "reference_set.cc",
+    "reference_set.h",
+    "rel32_finder.cc",
+    "rel32_finder.h",
+    "rel32_utils.cc",
+    "rel32_utils.h",
+    "reloc_utils.cc",
+    "reloc_utils.h",
+    "suffix_array.h",
+    "target_pool.cc",
+    "target_pool.h",
+    "targets_affinity.cc",
+    "targets_affinity.h",
+    "type_win_pe.h",
+    "typed_value.h",
+    "zucchini.h",
+    "zucchini_apply.cc",
+    "zucchini_apply.h",
+    "zucchini_gen.cc",
+    "zucchini_gen.h",
+    "zucchini_tools.cc",
+    "zucchini_tools.h",
+  ]
+
+  deps = [
+    "//base",
+  ]
+}
+
+static_library("zucchini_io") {
+  sources = [
+    "mapped_file.cc",
+    "mapped_file.h",
+    "zucchini_integration.cc",
+    "zucchini_integration.h",
+  ]
+
+  deps = [
+    ":zucchini_lib",
+    "//base",
+  ]
+}
+
+executable("zucchini") {
+  sources = [
+    "main_utils.cc",
+    "main_utils.h",
+    "zucchini_commands.cc",
+    "zucchini_commands.h",
+    "zucchini_main.cc",
+  ]
+
+  deps = [
+    ":zucchini_io",
+    ":zucchini_lib",
+    "//base",
+    "//build/config:exe_and_shlib_deps",
+  ]
+
+  if (is_win) {
+    deps += [ ":zucchini_exe_version" ]
+  }
+}
+
+if (is_win) {
+  process_version_rc_template("zucchini_exe_version") {
+    template_file = "zucchini_exe_version.rc.version"
+    output = "$target_gen_dir/zucchini_exe_version.rc"
+  }
+}
+
+fuzzer_test("zucchini_patch_fuzzer") {
+  sources = [
+    "patch_fuzzer.cc",
+  ]
+  deps = [
+    ":zucchini_lib",
+    "//base",
+  ]
+  seed_corpus = "testdata/patch_fuzzer"
+}
+
+test("zucchini_unittests") {
+  sources = [
+    "abs32_utils_unittest.cc",
+    "address_translator_unittest.cc",
+    "algorithm_unittest.cc",
+    "binary_data_histogram_unittest.cc",
+    "buffer_sink_unittest.cc",
+    "buffer_source_unittest.cc",
+    "buffer_view_unittest.cc",
+    "crc32_unittest.cc",
+    "element_detection_unittest.cc",
+    "encoded_view_unittest.cc",
+    "equivalence_map_unittest.cc",
+    "image_index_unittest.cc",
+    "image_utils_unittest.cc",
+    "io_utils_unittest.cc",
+    "label_manager_unittest.cc",
+    "mapped_file_unittest.cc",
+    "patch_read_write_unittest.cc",
+    "patch_utils_unittest.cc",
+    "reference_set_unittest.cc",
+    "rel32_finder_unittest.cc",
+    "rel32_utils_unittest.cc",
+    "reloc_utils_unittest.cc",
+    "suffix_array_unittest.cc",
+    "target_pool_unittest.cc",
+    "targets_affinity_unittest.cc",
+    "test_disassembler.cc",
+    "test_disassembler.h",
+    "test_reference_reader.cc",
+    "test_reference_reader.h",
+    "test_utils.cc",
+    "test_utils.h",
+    "typed_value_unittest.cc",
+    "zucchini_apply_unittest.cc",
+    "zucchini_gen_unittest.cc",
+  ]
+
+  deps = [
+    ":zucchini_io",
+    ":zucchini_lib",
+    "//base",
+    "//base/test:run_all_unittests",
+    "//base/test:test_support",
+    "//testing/gtest",
+  ]
+}
+
+test("zucchini_integration_test") {
+  sources = [
+    "integration_test.cc",
+  ]
+
+  deps = [
+    ":zucchini_lib",
+    "//base",
+    "//base/test:run_all_unittests",
+    "//base/test:test_support",
+    "//testing/gtest",
+  ]
+}