chromium/components/reporting/compression/BUILD.gn

# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/features.gni")

static_library("compression_module") {
  sources = [
    "compression_module.cc",
    "compression_module.h",
  ]

  public_deps = [ "//components/reporting/storage:storage_configuration" ]

  deps = [
    "//base",
    "//components/reporting/proto:record_constants",
    "//components/reporting/proto:record_proto",
    "//components/reporting/resources:resource_manager",
    "//components/reporting/util:status",
    "//third_party/snappy:snappy",
  ]
}

static_library("test_support") {
  testonly = true
  sources = [
    "decompression.cc",
    "decompression.h",
    "test_compression_module.cc",
    "test_compression_module.h",
  ]
  deps = [
    ":compression_module",
    "//base",
    "//base/test:test_support",
    "//components/reporting/proto:record_proto",
    "//components/reporting/resources:resource_manager",
    "//components/reporting/util:status",
    "//components/reporting/util:status_macros",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/snappy:snappy",
  ]
}

# All unit tests are built as part of the //components:components_unittests
# target and must be one targets named "unit_tests".
source_set("unit_tests") {
  testonly = true
  sources = [ "compression_module_unittest.cc" ]
  deps = [
    ":compression_module",
    "//base",
    "//base/test:test_support",
    "//components/reporting/proto:record_proto",
    "//components/reporting/resources:resource_manager",
    "//components/reporting/util:status",
    "//components/reporting/util:status_macros",
    "//components/reporting/util:test_callbacks_support",
    "//testing/gmock",
    "//testing/gtest",
    "//third_party/snappy:snappy",
  ]
}