chromium/chrome/browser/nearby_sharing/contacts/BUILD.gn

# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

assert(is_chromeos, "Nearby Share is CrOS only")

source_set("contacts") {
  sources = [
    "nearby_share_contact_downloader.cc",
    "nearby_share_contact_downloader.h",
    "nearby_share_contact_downloader_impl.cc",
    "nearby_share_contact_downloader_impl.h",
    "nearby_share_contact_manager.cc",
    "nearby_share_contact_manager.h",
    "nearby_share_contact_manager_impl.cc",
    "nearby_share_contact_manager_impl.h",
    "nearby_share_contacts_sorter.cc",
    "nearby_share_contacts_sorter.h",
  ]

  public_deps = [
    "//third_party/nearby:contact_rpc_proto",
    "//third_party/nearby:rpc_resources_proto",
  ]

  deps = [
    "//base",
    "//chrome/browser/nearby_sharing/client",
    "//chrome/browser/nearby_sharing/common",
    "//chrome/browser/nearby_sharing/local_device_data",
    "//chromeos/ash/components/nearby/common/client",
    "//chromeos/ash/components/nearby/common/scheduling",
    "//chromeos/ash/services/nearby/public/mojom",
    "//components/cross_device/logging:logging",
    "//components/prefs",
    "//crypto",
    "//third_party/nearby:device_rpc_proto",
  ]
}

source_set("test_support") {
  testonly = true

  sources = [
    "fake_nearby_share_contact_downloader.cc",
    "fake_nearby_share_contact_downloader.h",
    "fake_nearby_share_contact_manager.cc",
    "fake_nearby_share_contact_manager.h",
  ]

  deps = [
    ":contacts",
    "//base",
    "//third_party/nearby:rpc_resources_proto",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "nearby_share_contact_downloader_impl_unittest.cc",
    "nearby_share_contact_manager_impl_unittest.cc",
    "nearby_share_contacts_sorter_unittest.cc",
  ]

  deps = [
    ":contacts",
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//chrome/browser/nearby_sharing/client",
    "//chrome/browser/nearby_sharing/client:test_support",
    "//chrome/browser/nearby_sharing/common",
    "//chrome/browser/nearby_sharing/common:test_support",
    "//chrome/browser/nearby_sharing/local_device_data:test_support",
    "//chromeos/ash/components/nearby/common/client",
    "//chromeos/ash/components/nearby/common/scheduling",
    "//chromeos/ash/components/nearby/common/scheduling:test_support",
    "//chromeos/ash/services/nearby/public/mojom",
    "//components/sync_preferences:test_support",
    "//content/test:test_support",
    "//testing/gtest",
    "//third_party/nearby:contact_rpc_proto",
    "//third_party/nearby:rpc_resources_proto",
  ]
}