blob: 8b20c7409113ea495ff2fcebc3ceb0a2d4ef8849 [file] [log] [blame]
# 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("storage_configuration") {
sources = [
"storage_configuration.cc",
"storage_configuration.h",
]
deps = [
"//base",
"//components/reporting/proto:record_constants",
"//components/reporting/resources:resource_manager",
]
}
static_library("storage_uploader_interface") {
sources = [
"storage_uploader_interface.cc",
"storage_uploader_interface.h",
]
deps = [
"//base",
"//components/reporting/proto:configuration_file_proto",
"//components/reporting/proto:record_constants",
"//components/reporting/proto:record_proto",
"//components/reporting/proto:status_proto",
"//components/reporting/resources:resource_manager",
"//components/reporting/util:status",
]
}
static_library("storage_queue") {
sources = [
"storage_queue.cc",
"storage_queue.h",
]
deps = [
":storage_configuration",
":storage_uploader_interface",
":storage_util",
"//base",
"//components/reporting/compression:compression_module",
"//components/reporting/encryption:encryption_module_interface",
"//components/reporting/proto:record_constants",
"//components/reporting/proto:record_proto",
"//components/reporting/resources:resource_managed_buffer",
"//components/reporting/resources:resource_manager",
"//components/reporting/util:file",
"//components/reporting/util:refcounted_closure_list",
"//components/reporting/util:status",
"//components/reporting/util:status_macros",
"//components/reporting/util:task_runner_context",
"//crypto",
"//third_party/protobuf:protobuf_lite",
]
}
static_library("storage_module") {
sources = [
"storage_module.cc",
"storage_module.h",
]
public_deps = [ ":storage_configuration" ]
deps = [
":storage",
":storage_base",
":storage_module_interface",
":storage_uploader_interface",
"//base",
"//components/reporting/compression:compression_module",
"//components/reporting/encryption:encryption_module_interface",
"//components/reporting/proto:record_constants",
"//components/reporting/proto:record_proto",
"//components/reporting/util:status",
]
}
static_library("storage_module_interface") {
sources = [
"storage_module_interface.cc",
"storage_module_interface.h",
]
deps = [
"//base",
"//components/reporting/proto:record_constants",
"//components/reporting/proto:record_proto",
"//components/reporting/util:status",
]
}
static_library("test_support") {
testonly = true
sources = [
"test_storage_module.cc",
"test_storage_module.h",
]
public_deps = [
":storage_module_interface",
"//components/reporting/proto:record_constants",
"//components/reporting/proto:record_proto",
"//components/reporting/util:status",
]
deps = [
"//base",
"//testing/gmock",
"//testing/gtest",
]
}
static_library("storage_util") {
sources = [
"storage_util.cc",
"storage_util.h",
]
deps = [
":storage_configuration",
"//base",
"//components/reporting/util:file",
"//components/reporting/util:status",
]
}
static_library("key_delivery") {
sources = [
"key_delivery.cc",
"key_delivery.h",
]
deps = [
":storage_uploader_interface",
"//base",
"//components/reporting/encryption:encryption_module_interface",
"//components/reporting/util:status",
]
}
static_library("storage") {
sources = [
"storage.cc",
"storage.h",
]
public_deps = [ ":storage_configuration" ]
deps = [
":key_delivery",
":storage_base",
":storage_queue",
":storage_uploader_interface",
":storage_util",
"//base",
"//components/reporting/compression:compression_module",
"//components/reporting/encryption:encryption_module",
"//components/reporting/encryption:encryption_module_interface",
"//components/reporting/encryption:primitives",
"//components/reporting/proto:record_constants",
"//components/reporting/proto:record_proto",
"//components/reporting/resources:resource_manager",
"//components/reporting/util:file",
"//components/reporting/util:status",
"//components/reporting/util:status_macros",
"//components/reporting/util:task_runner_context",
"//crypto",
"//third_party/protobuf:protobuf_lite",
]
}
static_library("storage_base") {
sources = [
"storage_base.cc",
"storage_base.h",
]
deps = [
":storage_configuration",
":storage_queue",
":storage_uploader_interface",
"//components/reporting/encryption:encryption_module_interface",
"//components/reporting/encryption:primitives",
"//components/reporting/encryption:verification",
"//components/reporting/proto:record_constants",
"//components/reporting/proto:record_proto",
"//components/reporting/util:file",
"//components/reporting/util:status",
"//components/reporting/util:status_macros",
"//components/reporting/util:task_runner_context",
]
}
# 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 = [
"key_delivery_unittest.cc",
"legacy_storage_degradation_unittest.cc",
"legacy_storage_unittest.cc",
"storage_degradation_unittest.cc",
"storage_queue_stress_test.cc",
"storage_queue_unittest.cc",
"storage_unittest.cc",
"storage_util_unittest.cc",
]
deps = [
":key_delivery",
":storage",
":storage_base",
":storage_configuration",
":storage_module",
":storage_queue",
":storage_uploader_interface",
":test_support",
"//base",
"//base/test:test_support",
"//build:chromeos_buildflags",
"//components/reporting/compression:compression_module",
"//components/reporting/compression:test_support",
"//components/reporting/encryption:decryption",
"//components/reporting/encryption:encryption",
"//components/reporting/encryption:encryption_module",
"//components/reporting/encryption:encryption_module_interface",
"//components/reporting/encryption:test_support",
"//components/reporting/encryption:testing_primitives",
"//components/reporting/proto:record_proto",
"//components/reporting/resources:resource_managed_buffer",
"//components/reporting/resources:resource_manager",
"//components/reporting/storage:storage_util",
"//components/reporting/util:file",
"//components/reporting/util:status",
"//components/reporting/util:status_macros",
"//components/reporting/util:test_callbacks_support",
"//crypto",
"//testing/gmock",
"//testing/gtest",
]
}