blob: e2839ce744653098bb4c38db670b4bed4a7b556a [file] [log] [blame]
# Copyright 2018 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/chrome_cleaner/chrome_cleaner_args.gni")
source_set("scoped_timed_task_logger") {
sources = [
"scoped_timed_task_logger.cc",
"scoped_timed_task_logger.h",
]
deps = [
"//base",
]
}
source_set("common") {
sources = [
"detailed_info_sampler.cc",
"detailed_info_sampler.h",
"info_sampler.h",
"logging_service_api.cc",
"logging_service_api.h",
"network_checker.h",
"registry_logger.cc",
"registry_logger.h",
"safe_browsing_reporter.cc",
"safe_browsing_reporter.h",
"scoped_logging.cc",
"scoped_logging.h",
"utils.cc",
"utils.h",
]
deps = [
":logging_definitions",
":scoped_timed_task_logger",
"//base",
"//chrome/chrome_cleaner//http", # For safe_browsing_reporter
"//chrome/chrome_cleaner/constants:common_strings",
"//chrome/chrome_cleaner/constants:version_header",
"//chrome/chrome_cleaner/http:http_status_codes",
"//chrome/chrome_cleaner/logging/proto:removal_status_proto",
"//chrome/chrome_cleaner/os:common_os",
"//chrome/chrome_cleaner/proto:shared_pup_enums_proto",
"//chrome/chrome_cleaner/pup_data:pup_data_base",
"//chrome/chrome_cleaner/settings",
"//chrome/chrome_cleaner/settings:engine_settings_header",
"//chrome/chrome_cleaner/settings:settings_types",
"//components/chrome_cleaner/public/constants:constants",
"//url",
]
public_deps = [
"//chrome/chrome_cleaner/logging/proto:shared_data_proto",
"//net/traffic_annotation:traffic_annotation",
]
libs = [
"iphlpapi.lib", # For NotifyAddrChange.
"wininet.lib", # For InternetCheckConnection.
]
}
source_set("logging_definitions") {
sources = [
"logging_definitions.h",
]
}
# Logging definitions that must only by linked into the cleaner executable.
# This is separate from cleaner_logging, which is also linked with unit tests.
source_set("cleaner_logging_definitions") {
sources = [
"cleaner_logging_definitions.cc",
]
deps = [
":cleaner_logging",
":logging_definitions",
]
}
# Logging definitions that must only by linked into the reporter executable.
# This is separate from reporter_logging, which is also linked with unit tests.
source_set("reporter_logging_definitions") {
sources = [
"reporter_logging_definitions.cc",
]
deps = [
":logging_definitions",
":noop_logging",
":reporter_logging",
"//chrome/chrome_cleaner/settings",
]
}
# Logging definitions that are linked into all other executables.
source_set("other_logging_definitions") {
sources = [
"other_logging_definitions.cc",
]
deps = [
":logging_definitions",
":noop_logging",
]
}
source_set("api_keys_header") {
sources = [
"api_keys.h",
]
}
source_set("dummy_api_keys") {
sources = [
"dummy_api_keys.cc",
]
deps = [
":api_keys_header",
]
}
group("api_keys") {
if (is_internal_chrome_cleaner_build) {
deps = [
"//chrome/chrome_cleaner_internal/logging:api_keys",
]
} else {
deps = [
":dummy_api_keys",
]
}
}
static_library("cleaner_logging") {
sources = [
"cleaner_logging_service.cc",
"cleaner_logging_service.h",
"message_builder.cc",
"message_builder.h",
"pending_logs_service.cc",
"pending_logs_service.h",
]
deps = [
":api_keys",
":api_keys_header",
":common",
"//base",
"//chrome/chrome_cleaner/chrome_utils:chrome_util_lib",
"//chrome/chrome_cleaner/constants:chrome_cleanup_tool_branding_header",
"//chrome/chrome_cleaner/constants:common_strings",
"//chrome/chrome_cleaner/constants:version_header",
"//chrome/chrome_cleaner/logging/proto:chrome_cleaner_report_proto",
"//chrome/chrome_cleaner/logging/proto:removal_status_proto",
"//chrome/chrome_cleaner/os:cleaner_os",
"//chrome/chrome_cleaner/os:common_os",
"//chrome/chrome_cleaner/proto:shared_pup_enums_proto",
"//chrome/chrome_cleaner/pup_data:pup_data_base",
"//chrome/chrome_cleaner/settings",
"//chrome/chrome_cleaner/strings",
"//components/chrome_cleaner/public/constants:constants",
]
}
static_library("reporter_logging") {
sources = [
"reporter_logging_service.cc",
"reporter_logging_service.h",
]
deps = [
":api_keys",
":api_keys_header",
":common",
"//base",
"//chrome/chrome_cleaner/chrome_utils:chrome_util_lib",
"//chrome/chrome_cleaner/constants:common_strings",
"//chrome/chrome_cleaner/constants:version_header",
"//chrome/chrome_cleaner/logging:noop_logging",
"//chrome/chrome_cleaner/logging/proto:reporter_logs_proto",
"//chrome/chrome_cleaner/os:common_os",
"//chrome/chrome_cleaner/proto:shared_pup_enums_proto",
"//chrome/chrome_cleaner/pup_data:pup_data_base",
"//chrome/chrome_cleaner/settings",
"//components/chrome_cleaner/public/constants:constants",
]
}
static_library("noop_logging") {
sources = [
"noop_logging_service.cc",
"noop_logging_service.h",
]
deps = [
":common",
"//base",
"//chrome/chrome_cleaner/os:common_os",
"//chrome/chrome_cleaner/proto:shared_pup_enums_proto",
"//chrome/chrome_cleaner/pup_data:pup_data_base",
"//components/chrome_cleaner/public/constants:constants",
]
}
source_set("mock_logging_service") {
testonly = true
sources = [
"mock_logging_service.cc",
"mock_logging_service.h",
]
deps = [
"//base",
"//chrome/chrome_cleaner/logging:common",
"//chrome/chrome_cleaner/os:common_os",
"//chrome/chrome_cleaner/pup_data:pup_data_base",
"//components/chrome_cleaner/public/constants:constants",
"//testing/gmock",
]
}
source_set("test_utils") {
testonly = true
sources = [
"test_utils.cc",
"test_utils.h",
]
deps = [
":common",
"//base",
"//chrome/chrome_cleaner/logging/proto:shared_data_proto",
"//url",
]
}
source_set("unittest_sources") {
testonly = true
sources = [
"cleaner_logging_service_unittest.cc",
"detailed_info_sampler_unittest.cc",
"message_builder_unittest.cc",
"pending_logs_service_unittest.cc",
"registry_logger_unittest.cc",
"reporter_logging_service_unittest.cc",
"safe_browsing_reporter_unittest.cc",
"scoped_logging_unittest.cc",
"scoped_timed_task_logger_unittest.cc",
"utils_unittest.cc",
]
deps = [
":cleaner_logging",
":mock_logging_service",
":reporter_logging",
":test_utils",
"//base",
"//base/test:test_support",
"//chrome/chrome_cleaner/constants:common_strings",
"//chrome/chrome_cleaner/constants:version_header",
"//chrome/chrome_cleaner/http",
"//chrome/chrome_cleaner/http:mock_http_agent_factory",
"//chrome/chrome_cleaner/logging:common",
"//chrome/chrome_cleaner/logging:scoped_timed_task_logger",
"//chrome/chrome_cleaner/logging/proto:chrome_cleaner_report_proto",
"//chrome/chrome_cleaner/logging/proto:removal_status_proto",
"//chrome/chrome_cleaner/logging/proto:reporter_logs_proto",
"//chrome/chrome_cleaner/os:cleaner_os",
"//chrome/chrome_cleaner/os:common_os",
"//chrome/chrome_cleaner/proto:shared_pup_enums_proto",
"//chrome/chrome_cleaner/pup_data:pup_data_base",
"//chrome/chrome_cleaner/pup_data:test_uws",
"//chrome/chrome_cleaner/settings",
"//chrome/chrome_cleaner/test:test_branding_header",
"//chrome/chrome_cleaner/test:test_pup_data",
"//chrome/chrome_cleaner/test:test_util",
"//chrome/chrome_cleaner/test/resources:test_resources",
"//components/chrome_cleaner/public/constants:constants",
"//components/chrome_cleaner/test:test_name_helper",
"//net/traffic_annotation:test_support",
"//testing/gmock",
"//testing/gtest",
]
}