Avi Drissman | 8ba1bad | 2022-09-13 19:22:36 | [diff] [blame] | 1 | # Copyright 2019 The Chromium Authors |
Luc Nguyen | 97ad3ae | 2022-05-20 19:54:43 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | import("//tools/grit/preprocess_if_expr.gni") |
| 6 | import("//tools/typescript/ts_library.gni") |
| 7 | |
| 8 | preprocess_folder = "preprocessed" |
| 9 | |
| 10 | preprocess_if_expr("preprocess_ts") { |
| 11 | in_folder = "./" |
| 12 | out_folder = "$target_gen_dir/$preprocess_folder" |
| 13 | in_files = [ "local_state.ts" ] |
| 14 | } |
| 15 | |
| 16 | ts_library("build") { |
| 17 | root_dir = "$target_gen_dir/$preprocess_folder" |
| 18 | in_files = [ "local_state.ts" ] |
dpapad | 03e81fc | 2023-01-28 02:27:18 | [diff] [blame^] | 19 | deps = [ "//ui/webui/resources/js:build_ts" ] |
Luc Nguyen | 97ad3ae | 2022-05-20 19:54:43 | [diff] [blame] | 20 | extra_deps = [ ":preprocess_ts" ] |
| 21 | } |
| 22 | |
| 23 | source_set("local_state") { |
| 24 | sources = [ |
| 25 | "local_state_utils.cc", |
| 26 | "local_state_utils.h", |
| 27 | ] |
| 28 | deps = [ |
| 29 | "//base", |
| 30 | "//components/prefs", |
| 31 | ] |
| 32 | } |
| 33 | |
| 34 | source_set("unit_tests") { |
| 35 | testonly = true |
| 36 | sources = [ "local_state_utils_unittest.cc" ] |
| 37 | |
| 38 | deps = [ |
| 39 | ":local_state", |
| 40 | "//base", |
| 41 | "//testing/gtest", |
| 42 | ] |
| 43 | } |