# Copyright 2021 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-Chrome-OS builds must not depend on //ash")
component("policy") {
output_name = "chromeos_ash_components_policy"
defines = [ "IS_CHROMEOS_ASH_COMPONENTS_POLICY_IMPL" ]
public = [
"restriction_schedule/device_restriction_schedule_controller.h",
"weekly_time/checked_util.h",
"weekly_time/time_utils.h",
"weekly_time/weekly_time.h",
"weekly_time/weekly_time_checked.h",
"weekly_time/weekly_time_interval.h",
"weekly_time/weekly_time_interval_checked.h",
]
sources = [
"restriction_schedule/device_restriction_schedule_controller.cc",
"weekly_time/checked_util.cc",
"weekly_time/time_utils.cc",
"weekly_time/weekly_time.cc",
"weekly_time/weekly_time_checked.cc",
"weekly_time/weekly_time_interval.cc",
"weekly_time/weekly_time_interval_checked.cc",
]
public_deps = [
"//base",
"//components/policy/proto",
"//third_party/abseil-cpp:absl",
"//third_party/icu",
]
deps = [
"//base:i18n",
"//chromeos/constants",
"//components/prefs",
]
}
source_set("test_support") {
testonly = true
public = [ "weekly_time/test_support.h" ]
sources = [ "weekly_time/test_support.cc" ]
public_deps = [ "//base" ]
deps = [
"//chromeos/ash/components/policy",
"//testing/gtest",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"weekly_time/checked_util_unittest.cc",
"weekly_time/time_utils_unittest.cc",
"weekly_time/weekly_time_checked_unittest.cc",
"weekly_time/weekly_time_interval_checked_unittest.cc",
"weekly_time/weekly_time_interval_unittest.cc",
"weekly_time/weekly_time_unittest.cc",
]
deps = [
":policy",
":test_support",
"//base",
"//base:i18n",
"//base/test:test_support",
"//components/policy/proto",
"//testing/gtest",
"//third_party/icu",
]
}