File: BUILD.gn

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (143 lines) | stat: -rw-r--r-- 3,972 bytes parent folder | download | duplicates (5)
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# 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.

import("//testing/libfuzzer/fuzzer_test.gni")
import("//third_party/libprotobuf-mutator/fuzzable_proto_library.gni")

source_set("sql_builder") {
  sources = [
    "sql_table_builder.cc",
    "sql_table_builder.h",
  ]
  deps = [ "//sql" ]
  public_deps = [ "//base" ]
  configs += [ "//build/config/compiler:wexit_time_destructors" ]
}

fuzzable_proto_library("affiliation_proto") {
  sources = [ "affiliation_api.proto" ]
}

source_set("affiliations") {
  sources = [
    "affiliation_backend.cc",
    "affiliation_backend.h",
    "affiliation_constants.h",
    "affiliation_database.cc",
    "affiliation_database.h",
    "affiliation_fetch_throttler.cc",
    "affiliation_fetch_throttler.h",
    "affiliation_fetch_throttler_delegate.h",
    "affiliation_fetcher_factory.h",
    "affiliation_fetcher_factory_impl.cc",
    "affiliation_fetcher_factory_impl.h",
    "affiliation_fetcher_interface.cc",
    "affiliation_fetcher_interface.h",
    "affiliation_fetcher_manager.cc",
    "affiliation_fetcher_manager.h",
    "affiliation_prefetcher.cc",
    "affiliation_prefetcher.h",
    "affiliation_service.h",
    "affiliation_service_impl.cc",
    "affiliation_service_impl.h",
    "affiliation_source.h",
    "affiliation_utils.cc",
    "affiliation_utils.h",
    "facet_manager.cc",
    "facet_manager.h",
    "facet_manager_host.h",
    "hash_affiliation_fetcher.cc",
    "hash_affiliation_fetcher.h",
    "lookup_affiliation_response_parser.cc",
    "lookup_affiliation_response_parser.h",
  ]
  deps = [
    ":affiliation_proto",
    "//base",
    "//components/affiliations/core/browser:sql_builder",
    "//components/keyed_service/core",
    "//components/prefs",
    "//components/url_formatter",
    "//components/variations/net",
    "//google_apis",
    "//net",
    "//services/network/public/cpp",
    "//sql",
    "//url",
  ]
  configs += [ "//build/config/compiler:wexit_time_destructors" ]
}

source_set("test_support") {
  testonly = true
  sources = [
    "fake_affiliation_api.cc",
    "fake_affiliation_api.h",
    "fake_affiliation_fetcher.cc",
    "fake_affiliation_fetcher.h",
    "fake_affiliation_service.cc",
    "fake_affiliation_service.h",
    "mock_affiliation_consumer.cc",
    "mock_affiliation_consumer.h",
    "mock_affiliation_fetcher.cc",
    "mock_affiliation_fetcher.h",
    "mock_affiliation_fetcher_factory.cc",
    "mock_affiliation_fetcher_factory.h",
    "mock_affiliation_service.cc",
    "mock_affiliation_service.h",
    "mock_affiliation_source.cc",
    "mock_affiliation_source.h",
  ]
  deps = [
    ":affiliations",
    "//base",
    "//services/network:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "affiliation_backend_unittest.cc",
    "affiliation_database_unittest.cc",
    "affiliation_fetch_throttler_unittest.cc",
    "affiliation_fetcher_manager_unittest.cc",
    "affiliation_prefetcher_unittest.cc",
    "affiliation_service_impl_unittest.cc",
    "affiliation_utils_unittest.cc",
    "facet_manager_unittest.cc",
    "hash_affiliation_fetcher_unittest.cc",
    "sql_table_builder_unittest.cc",
  ]
  deps = [
    ":affiliation_proto",
    ":affiliations",
    ":sql_builder",
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//components/variations:test_support",
    "//services/network:test_support",
    "//services/network/public/mojom",
    "//sql:test_support",
    "//testing/gmock",
    "//testing/gtest",
    "//url",
  ]
}

if (use_fuzzing_engine_with_lpm) {
  fuzzer_test("lookup_affiliation_response_parser_fuzzer") {
    sources = [ "lookup_affiliation_response_parser_fuzzer.cc" ]
    deps = [
      ":affiliation_proto",
      ":affiliations",
      "//base:base",
      "//base:i18n",
      "//third_party/libprotobuf-mutator",
    ]
  }
}