# Copyright 2023 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//chrome/common/chromeos/extensions/api/api_sources.gni")
import("//extensions/buildflags/buildflags.gni")
assert(enable_extensions,
"Cannot depend on extensions because enable_extensions=false.")
source_set("telemetry") {
sources = [
"telemetry_api.cc",
"telemetry_api.h",
"telemetry_api_converters.cc",
"telemetry_api_converters.h",
]
deps = [
"//base",
"//build:chromeos_buildflags",
"//chrome/browser/chromeos/extensions/telemetry/api/common",
"//chrome/browser/chromeos/extensions/telemetry/api/common:remote_probe_strategy",
"//chrome/browser/extensions",
"//chrome/common/chromeos/extensions/api",
"//chromeos/crosapi/mojom",
"//chromeos/services/network_config/public/mojom:network_types",
"//chromeos/services/network_health/public/mojom:types",
"//extensions/browser",
"//extensions/common",
"//mojo/public/cpp/bindings",
"//third_party/abseil-cpp:absl",
]
}
source_set("browser_tests") {
testonly = true
defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
sources = [ "telemetry_api_browsertest.cc" ]
deps = [
":telemetry",
"//base",
"//build:chromeos_buildflags",
"//chrome/browser/chromeos/extensions/telemetry/api/common:remote_probe_strategy",
"//chrome/browser/chromeos/extensions/telemetry/api/common:test_support",
"//chromeos/crosapi/cpp/telemetry:test_support",
"//chromeos/crosapi/mojom",
"//chromeos/services/network_config/public/mojom:network_types",
"//chromeos/services/network_health/public/mojom:types",
"//content/test:test_support",
"//extensions/common",
"//mojo/public/cpp/bindings",
"//testing/gtest",
]
data = [ "//chrome/test/data" ]
if (is_chromeos_lacros) {
deps += [ "//chromeos/lacros" ]
}
if (is_chromeos_ash) {
deps +=
[ "//chromeos/ash/components/telemetry_extension/telemetry:telemetry" ]
}
}
source_set("unit_tests") {
testonly = true
sources = [ "telemetry_api_converters_unittest.cc" ]
deps = [
":telemetry",
"//chrome/common/chromeos/extensions/api",
"//chromeos/crosapi/mojom",
"//chromeos/services/network_config/public/mojom:network_types",
"//chromeos/services/network_health/public/mojom:types",
"//testing/gtest",
]
}