# Copyright 2016 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 //ash")
static_library("tether") {
sources = [
"active_host.cc",
"active_host.h",
"active_host_network_state_updater.cc",
"active_host_network_state_updater.h",
"asynchronous_shutdown_object_container.h",
"asynchronous_shutdown_object_container_impl.cc",
"asynchronous_shutdown_object_container_impl.h",
"connect_tethering_operation.cc",
"connect_tethering_operation.h",
"connection_preserver.h",
"connection_preserver_impl.cc",
"connection_preserver_impl.h",
"crash_recovery_manager.h",
"crash_recovery_manager_impl.cc",
"crash_recovery_manager_impl.h",
"device_id_tether_network_guid_map.cc",
"device_id_tether_network_guid_map.h",
"device_status_util.cc",
"device_status_util.h",
"disconnect_tethering_operation.cc",
"disconnect_tethering_operation.h",
"disconnect_tethering_request_sender.cc",
"disconnect_tethering_request_sender.h",
"disconnect_tethering_request_sender_impl.cc",
"disconnect_tethering_request_sender_impl.h",
"gms_core_notifications_state_tracker.cc",
"gms_core_notifications_state_tracker.h",
"gms_core_notifications_state_tracker_impl.cc",
"gms_core_notifications_state_tracker_impl.h",
"host_connection.cc",
"host_connection.h",
"host_connection_metrics_logger.cc",
"host_connection_metrics_logger.h",
"host_scan_cache.cc",
"host_scan_cache.h",
"host_scan_cache_entry.cc",
"host_scan_cache_entry.h",
"host_scan_scheduler.h",
"host_scan_scheduler_impl.cc",
"host_scan_scheduler_impl.h",
"host_scanner.cc",
"host_scanner.h",
"host_scanner_impl.cc",
"host_scanner_impl.h",
"hotspot_usage_duration_tracker.cc",
"hotspot_usage_duration_tracker.h",
"keep_alive_operation.cc",
"keep_alive_operation.h",
"keep_alive_scheduler.cc",
"keep_alive_scheduler.h",
"message_transfer_operation.cc",
"message_transfer_operation.h",
"message_wrapper.cc",
"message_wrapper.h",
"network_configuration_remover.cc",
"network_configuration_remover.h",
"network_connection_handler_tether_delegate.cc",
"network_connection_handler_tether_delegate.h",
"network_host_scan_cache.cc",
"network_host_scan_cache.h",
"network_list_sorter.cc",
"network_list_sorter.h",
"notification_presenter.h",
"notification_remover.cc",
"notification_remover.h",
"persistent_host_scan_cache.h",
"persistent_host_scan_cache_impl.cc",
"persistent_host_scan_cache_impl.h",
"pref_names.h",
"scanned_device_info.cc",
"scanned_device_info.h",
"secure_channel_host_connection.cc",
"secure_channel_host_connection.h",
"secure_channel_tether_availability_operation_orchestrator.cc",
"secure_channel_tether_availability_operation_orchestrator.h",
"synchronous_shutdown_object_container.h",
"synchronous_shutdown_object_container_impl.cc",
"synchronous_shutdown_object_container_impl.h",
"tether_availability_operation.cc",
"tether_availability_operation.h",
"tether_availability_operation_orchestrator.cc",
"tether_availability_operation_orchestrator.h",
"tether_component.cc",
"tether_component.h",
"tether_component_impl.cc",
"tether_component_impl.h",
"tether_connector.h",
"tether_connector_impl.cc",
"tether_connector_impl.h",
"tether_disconnector.h",
"tether_disconnector_impl.cc",
"tether_disconnector_impl.h",
"tether_host.cc",
"tether_host.h",
"tether_host_fetcher.cc",
"tether_host_fetcher.h",
"tether_host_fetcher_impl.cc",
"tether_host_fetcher_impl.h",
"tether_host_response_recorder.cc",
"tether_host_response_recorder.h",
"tether_network_disconnection_handler.cc",
"tether_network_disconnection_handler.h",
"tether_session_completion_logger.cc",
"tether_session_completion_logger.h",
"top_level_host_scan_cache.cc",
"top_level_host_scan_cache.h",
"wifi_hotspot_connector.cc",
"wifi_hotspot_connector.h",
"wifi_hotspot_disconnector.h",
"wifi_hotspot_disconnector_impl.cc",
"wifi_hotspot_disconnector_impl.h",
]
deps = [
"//ash/constants",
"//base",
"//chromeos/ash/components/login/login_state",
"//chromeos/ash/components/multidevice/logging",
"//chromeos/ash/components/network",
"//chromeos/ash/components/tether/proto",
"//chromeos/ash/components/timer_factory",
"//chromeos/ash/services/device_sync/public/cpp",
"//chromeos/ash/services/multidevice_setup/public/cpp:cpp",
"//chromeos/ash/services/secure_channel/public/cpp/client",
"//chromeos/ash/services/secure_channel/public/cpp/shared",
"//chromeos/ash/services/secure_channel/public/mojom",
"//chromeos/dbus/power",
"//components/pref_registry",
"//components/prefs",
"//components/session_manager/core",
"//device/bluetooth",
"//ui/gfx",
"//ui/message_center",
]
public_deps = [
"//chromeos/ash/services/device_sync/proto",
"//chromeos/ash/services/multidevice_setup/public/mojom",
"//third_party/nearby:presence_types",
]
}
static_library("test_support") {
testonly = true
sources = [
"fake_active_host.cc",
"fake_active_host.h",
"fake_asynchronous_shutdown_object_container.cc",
"fake_asynchronous_shutdown_object_container.h",
"fake_connection_preserver.cc",
"fake_connection_preserver.h",
"fake_crash_recovery_manager.cc",
"fake_crash_recovery_manager.h",
"fake_disconnect_tethering_request_sender.cc",
"fake_disconnect_tethering_request_sender.h",
"fake_gms_core_notifications_state_tracker.cc",
"fake_gms_core_notifications_state_tracker.h",
"fake_host_connection.cc",
"fake_host_connection.h",
"fake_host_scan_cache.cc",
"fake_host_scan_cache.h",
"fake_host_scan_scheduler.cc",
"fake_host_scan_scheduler.h",
"fake_host_scanner.cc",
"fake_host_scanner.h",
"fake_network_configuration_remover.cc",
"fake_network_configuration_remover.h",
"fake_notification_presenter.cc",
"fake_notification_presenter.h",
"fake_synchronous_shutdown_object_container.cc",
"fake_synchronous_shutdown_object_container.h",
"fake_tether_availability_operation.cc",
"fake_tether_availability_operation.h",
"fake_tether_component.cc",
"fake_tether_component.h",
"fake_tether_connector.cc",
"fake_tether_connector.h",
"fake_tether_disconnector.cc",
"fake_tether_disconnector.h",
"fake_tether_host_fetcher.cc",
"fake_tether_host_fetcher.h",
"fake_tether_session_completion_logger.cc",
"fake_tether_session_completion_logger.h",
"fake_wifi_hotspot_connector.cc",
"fake_wifi_hotspot_connector.h",
"fake_wifi_hotspot_disconnector.cc",
"fake_wifi_hotspot_disconnector.h",
"host_scan_test_util.cc",
"host_scan_test_util.h",
"mock_host_connection_metrics_logger.cc",
"mock_host_connection_metrics_logger.h",
"mock_tether_host_response_recorder.cc",
"mock_tether_host_response_recorder.h",
"proto_test_util.cc",
"proto_test_util.h",
]
public_deps = [ ":tether" ]
deps = [
"//base",
"//base/test:test_support",
"//chromeos/ash/components/multidevice",
"//chromeos/ash/components/multidevice:test_support",
"//chromeos/ash/components/network:test_support",
"//chromeos/ash/components/tether/proto",
"//chromeos/ash/components/timer_factory:timer_factory",
"//chromeos/ash/services/device_sync/public/cpp:test_support",
"//chromeos/ash/services/secure_channel/public/cpp/client:test_support",
"//chromeos/ash/services/secure_channel/public/cpp/shared",
"//device/bluetooth",
"//testing/gmock",
"//testing/gtest",
"//ui/message_center:test_support",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"active_host_network_state_updater_unittest.cc",
"active_host_unittest.cc",
"asynchronous_shutdown_object_container_impl_unittest.cc",
"connect_tethering_operation_unittest.cc",
"connection_preserver_impl_unittest.cc",
"crash_recovery_manager_impl_unittest.cc",
"device_status_util_unittest.cc",
"disconnect_tethering_operation_unittest.cc",
"disconnect_tethering_request_sender_impl_unittest.cc",
"gms_core_notifications_state_tracker_impl_unittest.cc",
"host_connection_metrics_logger_unittest.cc",
"host_scan_cache_unittest.cc",
"host_scan_scheduler_impl_unittest.cc",
"host_scanner_impl_unittest.cc",
"hotspot_usage_duration_tracker_unittest.cc",
"keep_alive_operation_unittest.cc",
"keep_alive_scheduler_unittest.cc",
"message_transfer_operation_unittest.cc",
"message_wrapper_unittest.cc",
"network_configuration_remover_unittest.cc",
"network_connection_handler_tether_delegate_unittest.cc",
"network_host_scan_cache_unittest.cc",
"network_list_sorter_unittest.cc",
"notification_remover_unittest.cc",
"persistent_host_scan_cache_impl_unittest.cc",
"secure_channel_host_connection_unittest.cc",
"secure_channel_tether_availability_operation_orchestrator_unittest.cc",
"tether_availability_operation_orchestrator_unittest.cc",
"tether_availability_operation_unittest.cc",
"tether_component_impl_unittest.cc",
"tether_connector_impl_unittest.cc",
"tether_disconnector_impl_unittest.cc",
"tether_host_fetcher_impl_unittest.cc",
"tether_host_response_recorder_unittest.cc",
"tether_host_unittest.cc",
"tether_network_disconnection_handler_unittest.cc",
"tether_session_completion_logger_unittest.cc",
"top_level_host_scan_cache_unittest.cc",
"wifi_hotspot_connector_unittest.cc",
"wifi_hotspot_disconnector_impl_unittest.cc",
]
deps = [
":test_support",
":tether",
"//base/test:test_support",
"//chromeos/ash/components/login/login_state",
"//chromeos/ash/components/multidevice",
"//chromeos/ash/components/multidevice:test_support",
"//chromeos/ash/components/network:test_support",
"//chromeos/ash/components/tether/proto",
"//chromeos/ash/components/timer_factory:test_support",
"//chromeos/ash/components/timer_factory:timer_factory",
"//chromeos/ash/services/device_sync:test_support",
"//chromeos/ash/services/device_sync/public/cpp",
"//chromeos/ash/services/device_sync/public/cpp:test_support",
"//chromeos/ash/services/device_sync/public/mojom",
"//chromeos/ash/services/multidevice_setup/public/cpp:test_support",
"//chromeos/ash/services/multidevice_setup/public/mojom:mojom",
"//chromeos/ash/services/secure_channel:test_support",
"//chromeos/ash/services/secure_channel/public/cpp/client",
"//chromeos/ash/services/secure_channel/public/cpp/client:test_support",
"//chromeos/ash/services/secure_channel/public/cpp/shared",
"//chromeos/dbus/power",
"//components/prefs:test_support",
"//components/session_manager/core",
"//components/sync_preferences:test_support",
"//device/bluetooth",
"//device/bluetooth:mocks",
"//testing/gmock",
"//testing/gtest",
"//ui/message_center:test_support",
]
}