Cleanup: Only build extensions renderer code when extensions are enabled.
[chromium-blink-merge.git] / components / domain_reliability / BUILD.gn
blobc0b2b4eefdd87ba4888cc26f99bcf877c0c5c9bc
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 action("bake_in_configs") {
6   visibility = [ ":*" ]
7   script = "bake_in_configs.py"
9   inputs = [
10     "baked_in_configs/apis_google_com.json",
11     "baked_in_configs/ddm_google_com.json",
12     "baked_in_configs/drive_google_com.json",
13     "baked_in_configs/mail_google_com.json",
14     "baked_in_configs/ssl_gstatic_com.json",
15     "baked_in_configs/www_google_com.json",
16     "baked_in_configs/www_youtube_com.json",
17   ]
18   outputs = [
19     "$target_gen_dir/baked_in_configs.cc",
20   ]
22   args = rebase_path(inputs, root_build_dir) +
23          rebase_path(outputs, root_build_dir)
26 component("domain_reliability") {
27   sources = [
28     "baked_in_configs.h",
29     "beacon.cc",
30     "beacon.h",
31     "clear_mode.h",
32     "config.cc",
33     "config.h",
34     "context.cc",
35     "context.h",
36     "dispatcher.cc",
37     "dispatcher.h",
38     "domain_reliability_export.h",
39     "monitor.cc",
40     "monitor.h",
41     "scheduler.cc",
42     "scheduler.h",
43     "service.cc",
44     "service.h",
45     "uploader.cc",
46     "uploader.h",
47     "util.cc",
48     "util.h",
49   ]
50   sources += get_target_outputs(":bake_in_configs")
52   defines = [ "DOMAIN_RELIABILITY_IMPLEMENTATION" ]
54   deps = [
55     ":bake_in_configs",
56     "//base",
57     "//components/keyed_service/core",
58     "//content/public/browser",
59     "//net",
60     "//url",
61   ]
64 source_set("unit_tests") {
65   testonly = true
66   sources = [
67     "config_unittest.cc",
68     "context_unittest.cc",
69     "dispatcher_unittest.cc",
70     "monitor_unittest.cc",
71     "scheduler_unittest.cc",
72     "test_util.cc",
73     "test_util.h",
74     "uploader_unittest.cc",
75     "util_unittest.cc",
76   ]
78   deps = [
79     ":domain_reliability",
80     "//testing/gtest",
81   ]