File: BUILD.gn

package info (click to toggle)
chromium 138.0.7204.157-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,864 kB
  • sloc: cpp: 34,936,859; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,967; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (176 lines) | stat: -rw-r--r-- 5,260 bytes parent folder | download | duplicates (3)
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# Copyright 2014 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/features.gni")
import("//ppapi/buildflags/buildflags.gni")

static_library("browser") {
  sources = [
    "content_settings_default_provider.cc",
    "content_settings_default_provider.h",
    "content_settings_global_value_map.cc",
    "content_settings_global_value_map.h",
    "content_settings_info.cc",
    "content_settings_info.h",
    "content_settings_observable_provider.cc",
    "content_settings_observable_provider.h",
    "content_settings_observer.h",
    "content_settings_origin_value_map.cc",
    "content_settings_origin_value_map.h",
    "content_settings_partitioned_origin_value_map.cc",
    "content_settings_partitioned_origin_value_map.h",
    "content_settings_policy_provider.cc",
    "content_settings_policy_provider.h",
    "content_settings_pref.cc",
    "content_settings_pref.h",
    "content_settings_pref_provider.cc",
    "content_settings_pref_provider.h",
    "content_settings_provider.cc",
    "content_settings_provider.h",
    "content_settings_registry.cc",
    "content_settings_registry.h",
    "content_settings_rule.cc",
    "content_settings_rule.h",
    "content_settings_type_set.h",
    "content_settings_uma_util.cc",
    "content_settings_uma_util.h",
    "content_settings_utils.cc",
    "content_settings_utils.h",
    "host_content_settings_map.cc",
    "host_content_settings_map.h",
    "single_value_wildcard_rule_iterator.cc",
    "single_value_wildcard_rule_iterator.h",
    "user_modifiable_provider.cc",
    "user_modifiable_provider.h",
    "website_settings_info.cc",
    "website_settings_info.h",
    "website_settings_registry.cc",
    "website_settings_registry.h",
  ]

  public_deps = [ "//base" ]
  deps = [
    "//build:blink_buildflags",
    "//components/content_settings/core/common",
    "//components/keyed_service/core",
    "//components/pref_registry:pref_registry",
    "//components/prefs",
    "//components/privacy_sandbox:features",
    "//components/privacy_sandbox:tracking_protection_prefs",
    "//components/tpcd/metadata/browser",
    "//components/url_formatter",
    "//extensions/buildflags",
    "//net",
    "//services/network/public/mojom",
    "//services/preferences/public/cpp",
    "//services/tracing/public/cpp",
    "//url",
  ]

  if (use_blink) {
    deps += [
      "//components/policy:generated",
      "//components/policy/core/browser",
      "//components/privacy_sandbox:privacy_sandbox_prefs",
    ]
  }

  configs += [ "//build/config/compiler:wexit_time_destructors" ]
}

source_set("cookie_settings") {
  sources = [
    "cookie_settings.cc",
    "cookie_settings.h",
  ]

  if (!is_ios) {
    sources += [
      "cookie_settings_policy_handler.cc",
      "cookie_settings_policy_handler.h",
    ]
  }
  public_deps = [ "//base" ]

  deps = [
    ":browser",
    "//build:blink_buildflags",
    "//components/content_settings/core/common",
    "//components/keyed_service/core",
    "//components/policy/core/browser",
    "//components/pref_registry:pref_registry",
    "//components/prefs",
    "//components/privacy_sandbox:features",
    "//components/privacy_sandbox:tracking_protection_prefs",
    "//components/privacy_sandbox:tracking_protection_settings",
    "//components/tpcd/metadata/browser",
    "//extensions/buildflags",
    "//net",
    "//url",
  ]
}

source_set("unit_tests") {
  testonly = true
  sources = [
    "content_settings_partitioned_origin_value_map_unittest.cc",
    "content_settings_pref_unittest.cc",
    "content_settings_registry_unittest.cc",
    "content_settings_rule_unittest.cc",
    "content_settings_utils_unittest.cc",
    "cookie_settings_unittest.cc",
    "website_settings_registry_unittest.cc",
  ]

  if (enable_plugins) {
    sources += [ "content_settings_provider_unittest.cc" ]
  }

  deps = [
    ":browser",
    "//base",
    "//base/test:test_support",
    "//components/content_settings/core/common",
    "//components/content_settings/core/test:test_support",
    "//components/pref_registry:pref_registry",
    "//components/prefs",
    "//components/prefs:test_support",
    "//components/privacy_sandbox:features",
    "//components/privacy_sandbox:privacy_sandbox_prefs",
    "//components/privacy_sandbox:tracking_protection_prefs",
    "//components/privacy_sandbox:tracking_protection_settings",
    "//components/sync_preferences:test_support",
    "//components/tpcd/metadata/browser",
    "//extensions/buildflags",
    "//net",
    "//ppapi/buildflags:buildflags",
    "//services/preferences/public/cpp",
    "//testing/gmock",
    "//testing/gtest",
    "//url",
  ]

  if (use_blink) {
    # Policies haven't been updated for iOS yet since blink
    # support is only a prototype.
    if (!is_ios) {
      sources += [ "cookie_settings_policy_handler_unittest.cc" ]
    }

    deps += [
      "//components/policy:generated",
      "//components/policy/core/browser:test_support",
    ]
  }
}

source_set("test_support") {
  testonly = true
  sources = [
    "content_settings_mock_observer.cc",
    "content_settings_mock_observer.h",
  ]
  public_deps = [ ":browser" ]
  deps = [ "//testing/gmock" ]
}