chromium/chromeos/ash/components/nearby/common/scheduling/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.

import("//build/config/chromeos/ui_mode.gni")

assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //ash")

source_set("scheduling") {
  sources = [
    "nearby_expiration_scheduler.cc",
    "nearby_expiration_scheduler.h",
    "nearby_on_demand_scheduler.cc",
    "nearby_on_demand_scheduler.h",
    "nearby_periodic_scheduler.cc",
    "nearby_periodic_scheduler.h",
    "nearby_scheduler.cc",
    "nearby_scheduler.h",
    "nearby_scheduler_base.cc",
    "nearby_scheduler_base.h",
    "nearby_scheduler_factory.cc",
    "nearby_scheduler_factory.h",
  ]

  deps = [
    "//base",
    "//components/cross_device/logging:logging",
    "//components/prefs",
    "//content/public/browser",
    "//services/network/public/cpp",
  ]
}

source_set("test_support") {
  testonly = true

  sources = [
    "fake_nearby_scheduler.cc",
    "fake_nearby_scheduler.h",
    "fake_nearby_scheduler_factory.cc",
    "fake_nearby_scheduler_factory.h",
  ]

  deps = [
    ":scheduling",
    "//base",
  ]
}

source_set("unit_tests") {
  testonly = true

  sources = [
    "nearby_expiration_scheduler_unittest.cc",
    "nearby_on_demand_scheduler_unittest.cc",
    "nearby_periodic_scheduler_unittest.cc",
    "nearby_scheduler_base_unittest.cc",
  ]

  deps = [
    ":scheduling",
    "//base",
    "//base/test:test_support",
    "//components/prefs",
    "//components/prefs:test_support",
    "//content/public/browser",
    "//services/network:test_support",
    "//testing/gtest",
  ]
}