chromium/chromeos/ash/components/multidevice/BUILD.gn

# Copyright 2018 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)

static_library("multidevice") {
  sources = [
    "beacon_seed.cc",
    "beacon_seed.h",
    "expiring_remote_device_cache.cc",
    "expiring_remote_device_cache.h",
    "remote_device.cc",
    "remote_device.h",
    "remote_device_cache.cc",
    "remote_device_cache.h",
    "remote_device_ref.cc",
    "remote_device_ref.h",
    "secure_message_delegate.cc",
    "secure_message_delegate.h",
    "secure_message_delegate_impl.cc",
    "secure_message_delegate_impl.h",
    "software_feature.cc",
    "software_feature.h",
    "software_feature_state.cc",
    "software_feature_state.h",
  ]

  deps = [
    "//base",
    "//base:i18n",
    "//chromeos/ash/components/dbus",
    "//chromeos/ash/components/dbus/easy_unlock",
    "//chromeos/ash/components/multidevice/logging",
    "//chromeos/ash/services/device_sync/proto:util",
    "//components/prefs",
  ]

  public_deps = [
    "//base",
    "//chromeos/ash/services/device_sync/proto",
    "//third_party/securemessage/proto",
  ]
}

static_library("stub_multidevice_util") {
  sources = [
    "stub_multidevice_util.cc",
    "stub_multidevice_util.h",
  ]

  deps = [
    ":multidevice",
    "//ash/constants",
    "//base",
    "//chromeos/ash/services/device_sync/proto",
  ]
}

static_library("test_support") {
  testonly = true

  sources = [
    "fake_secure_message_delegate.cc",
    "fake_secure_message_delegate.h",
    "remote_device_test_util.cc",
    "remote_device_test_util.h",
  ]

  public_deps = [ ":multidevice" ]

  deps = [
    "//base",
    "//chromeos/ash/services/device_sync/proto",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "expiring_remote_device_cache_unittest.cc",
    "fake_secure_message_delegate_unittest.cc",
    "remote_device_cache_unittest.cc",
    "remote_device_ref_unittest.cc",
  ]

  deps = [
    ":multidevice",
    ":test_support",
    "//base/test:test_support",
    "//chromeos/ash/components/multidevice/logging:unit_tests",
    "//chromeos/ash/components/multidevice/mojom:unit_tests",
    "//chromeos/ash/services/device_sync/proto",
    "//testing/gtest",
  ]
}