1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
# Copyright 2024 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, "Non-ChromeOS builds cannot depend on //chromeos")
component("weekly_time") {
output_name = "chromeos_ash_components_policy_weekly_time"
defines = [ "IS_CHROMEOS_ASH_COMPONENTS_POLICY_IMPL" ]
public_deps = [
":weekly_time_checked",
":weekly_time_internal",
]
}
source_set("weekly_time_internal") {
visibility = [ ":weekly_time" ]
defines = [ "IS_CHROMEOS_ASH_COMPONENTS_POLICY_IMPL" ]
public = [
"time_utils.h",
"weekly_time.h",
"weekly_time_interval.h",
]
sources = [
"time_utils.cc",
"weekly_time.cc",
"weekly_time_interval.cc",
]
public_deps = [
"//base",
"//third_party/icu",
]
deps = [
"//base:i18n",
"//components/policy/proto",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"time_utils_unittest.cc",
"weekly_time_interval_unittest.cc",
"weekly_time_unittest.cc",
]
deps = [
":weekly_time",
"//base",
"//base:i18n",
"//base/test:test_support",
"//components/policy/proto",
"//testing/gtest",
"//third_party/icu",
]
}
source_set("weekly_time_checked") {
visibility = [ ":weekly_time" ]
defines = [ "IS_CHROMEOS_ASH_COMPONENTS_POLICY_IMPL" ]
public = [
"checked_util.h",
"weekly_time_checked.h",
"weekly_time_interval_checked.h",
]
sources = [
"checked_util.cc",
"weekly_time_checked.cc",
"weekly_time_interval_checked.cc",
]
public_deps = [ "//base" ]
deps = []
}
source_set("test_support") {
testonly = true
public = [ "test_support.h" ]
sources = [ "test_support.cc" ]
public_deps = [
":weekly_time",
"//base",
]
deps = [ "//testing/gtest" ]
}
source_set("unit_tests_checked") {
testonly = true
sources = [
"checked_util_unittest.cc",
"weekly_time_checked_unittest.cc",
"weekly_time_interval_checked_unittest.cc",
]
deps = [
":test_support",
":weekly_time",
"//base",
"//base/test:test_support",
"//testing/gtest",
]
}
|