# Copyright 2022 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/chromeos/ui_mode.gni")
assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //chromeos/ash")
source_set("metrics") {
# Due to circular dependency, others should depend on via
# chromeos/ash/components/network.
visibility = [
"//chromeos/ash/components/network",
"//chromeos/ash/components/network/metrics:test_support",
]
configs += [ "//chromeos/ash/components/network:network_config" ]
deps = [
"//ash/constants:constants",
"//base",
"//chromeos/ash/components/dbus/hermes",
"//chromeos/ash/components/feature_usage",
"//chromeos/ash/components/login/login_state",
"//chromeos/ash/services/hotspot_config/public/mojom",
"//chromeos/services/network_config/public/mojom",
"//components/device_event_log",
"//components/onc",
]
sources = [
"cellular_network_metrics_logger.cc",
"cellular_network_metrics_logger.h",
"connection_info_metrics_logger.cc",
"connection_info_metrics_logger.h",
"connection_results.cc",
"connection_results.h",
"default_network_metrics_logger.cc",
"default_network_metrics_logger.h",
"esim_policy_login_metrics_logger.cc",
"esim_policy_login_metrics_logger.h",
"hotspot_feature_usage_metrics.cc",
"hotspot_feature_usage_metrics.h",
"hotspot_metrics_helper.cc",
"hotspot_metrics_helper.h",
"network_metrics_helper.cc",
"network_metrics_helper.h",
"vpn_network_metrics_helper.cc",
"vpn_network_metrics_helper.h",
"wifi_network_metrics_helper.cc",
"wifi_network_metrics_helper.h",
]
}
source_set("unit_tests") {
testonly = true
deps = [
":test_support",
"//ash/constants",
"//ash/constants:constants",
"//base",
"//base/test:test_support",
"//chromeos/ash/components/dbus/shill",
"//chromeos/ash/components/feature_usage",
"//chromeos/ash/components/login/login_state",
"//chromeos/ash/components/network",
"//chromeos/ash/components/network:test_support",
"//chromeos/dbus/power",
"//components/onc",
"//components/prefs",
"//components/prefs:test_support",
"//testing/gtest",
]
sources = [
"cellular_network_metrics_logger_unittest.cc",
"connection_info_metrics_logger_unittest.cc",
"default_network_metrics_logger_unittest.cc",
"esim_policy_login_metrics_logger_unittest.cc",
"hotspot_feature_usage_metrics_unittest.cc",
"hotspot_metrics_helper_unittest.cc",
"network_metrics_helper_unittest.cc",
"vpn_network_metrics_helper_unittest.cc",
"wifi_network_metrics_helper_unittest.cc",
]
}
source_set("test_support") {
testonly = true
deps = [
":metrics",
"//base",
"//base/test:test_support",
"//testing/gtest",
]
sources = [
"cellular_network_metrics_test_helper.cc",
"cellular_network_metrics_test_helper.h",
]
}