# 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("//build/config/chromeos/ui_mode.gni")
import("//testing/test.gni")
assert(is_chromeos_ash, "Non-Chrome-OS builds must not depend on //ash")
static_library("credentials") {
sources = [
"local_device_data_provider.h",
"local_device_data_provider_impl.cc",
"local_device_data_provider_impl.h",
"nearby_presence_credential_manager.h",
"nearby_presence_credential_manager_impl.cc",
"nearby_presence_credential_manager_impl.h",
"nearby_presence_server_client.h",
"nearby_presence_server_client_impl.cc",
"nearby_presence_server_client_impl.h",
"prefs.cc",
"prefs.h",
]
deps = [
"//base",
"//chromeos/ash/components/nearby/common/client",
"//chromeos/ash/components/nearby/common/proto",
"//chromeos/ash/components/nearby/common/scheduling",
"//chromeos/ash/components/nearby/presence/conversions",
"//chromeos/ash/components/nearby/presence/metrics",
"//chromeos/ash/components/nearby/presence/proto",
"//chromeos/ash/services/nearby/public/cpp:cpp",
"//chromeos/ash/services/nearby/public/mojom",
"//chromeos/strings",
"//components/cross_device/logging:logging",
"//components/prefs",
"//components/signin/public/identity_manager",
"//net",
"//net/traffic_annotation",
"//services/network/public/cpp",
"//services/network/public/mojom",
"//ui/base",
"//ui/chromeos",
"//url",
]
public_deps = [
"//third_party/nearby:connections_credential_proto",
"//third_party/nearby:connections_local_credential_proto",
"//third_party/nearby:connections_metadata_proto",
]
}
source_set("test_support") {
testonly = true
sources = [
"fake_local_device_data_provider.cc",
"fake_local_device_data_provider.h",
"fake_nearby_presence_credential_manager.cc",
"fake_nearby_presence_credential_manager.h",
"fake_nearby_presence_server_client.cc",
"fake_nearby_presence_server_client.h",
]
deps = [
":credentials",
"//base",
"//chromeos/ash/components/nearby/common/client",
"//chromeos/ash/components/nearby/presence/proto",
"//components/prefs",
"//components/signin/public/identity_manager",
"//mojo/public/cpp/bindings",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"local_device_data_provider_impl_unittest.cc",
"nearby_presence_credential_manager_impl_unittest.cc",
"nearby_presence_server_client_impl_unittest.cc",
]
deps = [
":credentials",
":test_support",
"//base",
"//base/test:test_support",
"//chromeos/ash/components/nearby/common/client",
"//chromeos/ash/components/nearby/common/scheduling:test_support",
"//chromeos/ash/components/nearby/presence/conversions",
"//chromeos/ash/components/nearby/presence/proto",
"//chromeos/ash/services/nearby/public/cpp:cpp",
"//chromeos/ash/services/nearby/public/cpp:test_support",
"//chromeos/ash/services/nearby/public/mojom",
"//chromeos/strings",
"//components/prefs",
"//components/prefs:test_support",
"//components/signin/public/identity_manager:test_support",
"//mojo/public/cpp/bindings",
"//net",
"//net/traffic_annotation:test_support",
"//services/network:test_support",
"//testing/gmock",
"//testing/gtest",
"//ui/base",
"//ui/chromeos",
]
public_deps = [
"//third_party/nearby:connections_credential_proto",
"//third_party/nearby:connections_metadata_proto",
]
}