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 (185 lines) | stat: -rw-r--r-- 6,750 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
177
178
179
180
181
182
183
184
185
# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//third_party/cast_core/public/src/proto/proto.gni")

static_library("test_support") {
  testonly = true

  sources = [
    "client_storage.cc",
    "client_storage.h",
    "embedded_policy_test_server.cc",
    "embedded_policy_test_server.h",
    "policy_storage.cc",
    "policy_storage.h",
    "remote_commands_result_waiter.cc",
    "remote_commands_result_waiter.h",
    "remote_commands_state.cc",
    "remote_commands_state.h",
    "request_handler_for_api_authorization.cc",
    "request_handler_for_api_authorization.h",
    "request_handler_for_auto_enrollment.cc",
    "request_handler_for_auto_enrollment.h",
    "request_handler_for_browser_public_key_upload.cc",
    "request_handler_for_browser_public_key_upload.h",
    "request_handler_for_cert_upload.cc",
    "request_handler_for_cert_upload.h",
    "request_handler_for_check_android_management.cc",
    "request_handler_for_check_android_management.h",
    "request_handler_for_check_user_account.cc",
    "request_handler_for_check_user_account.h",
    "request_handler_for_chrome_desktop_report.cc",
    "request_handler_for_chrome_desktop_report.h",
    "request_handler_for_client_cert_provisioning.cc",
    "request_handler_for_client_cert_provisioning.h",
    "request_handler_for_determine_promotion_eligibility.cc",
    "request_handler_for_determine_promotion_eligibility.h",
    "request_handler_for_device_attribute_update.cc",
    "request_handler_for_device_attribute_update.h",
    "request_handler_for_device_attribute_update_permission.cc",
    "request_handler_for_device_attribute_update_permission.h",
    "request_handler_for_device_initial_enrollment_state.cc",
    "request_handler_for_device_initial_enrollment_state.h",
    "request_handler_for_device_state_retrieval.cc",
    "request_handler_for_device_state_retrieval.h",
    "request_handler_for_policy.cc",
    "request_handler_for_policy.h",
    "request_handler_for_register_browser.cc",
    "request_handler_for_register_browser.h",
    "request_handler_for_register_cert_based.cc",
    "request_handler_for_register_cert_based.h",
    "request_handler_for_register_device_and_user.cc",
    "request_handler_for_register_device_and_user.h",
    "request_handler_for_remote_commands.cc",
    "request_handler_for_remote_commands.h",
    "request_handler_for_status_upload.cc",
    "request_handler_for_status_upload.h",
    "request_handler_for_unregister.cc",
    "request_handler_for_unregister.h",
    "request_handler_for_upload_euicc_info.cc",
    "request_handler_for_upload_euicc_info.h",
    "signature_provider.cc",
    "signature_provider.h",
    "test_server_helpers.cc",
    "test_server_helpers.h",
  ]
  if (is_chromeos) {
    sources += [
      "fake_dmserver.cc",
      "fake_dmserver.h",
      "request_handler_for_psm_auto_enrollment.cc",
      "request_handler_for_psm_auto_enrollment.h",
    ]
  }

  public_deps = [ "//net:test_support" ]
  deps = [
    "//base",
    "//components/policy/core/common:common_constants",
    "//components/policy/core/common:test_support",
    "//components/policy/proto",
    "//crypto",
    "//google_apis:google_apis",
    "//net",
    "//net:test_support",
    "//third_party/private_membership:private_membership_proto",
    "//third_party/re2:re2",
  ]

  if (is_chromeos) {
    public_deps += [ "//third_party/private_membership" ]
    deps += [
      ":remote_commands_service_castcore",
      "//chromecast/cast_core/grpc:grpc",
    ]
    data = [
      # TODO(crbug.com/40248354): Script should create binarypb from textpb.
      # Required for policy/enrollment/psm/rlwe_test_support.cc
      "//third_party/private_membership/src/internal/testing/regression_test_data/test_data.binarypb",
    ]
  }
}

if (is_chromeos) {
  cast_core_grpc_library("remote_commands_service") {
    testonly = true
    sources = [ "remote_commands_service.proto" ]
    deps = [
      "//components/policy/proto:proto_internal",
      "//third_party/private_membership:private_membership_proto",
    ]

    extra_configs =
        [ "//third_party/private_membership:private_membership_config" ]
    import_dirs = [
      "//components/policy/proto",
      "//third_party/private_membership/src",
      "//third_party/shell-encryption/src",
    ]
    generate_castcore_stubs = true
  }

  executable("fake_dmserver") {
    testonly = true
    output_name = "fake_dmserver"
    sources = [ "fake_dmserver_main.cc" ]
    deps = [
      ":test_support",
      "//base",
      "//third_party/abseil-cpp:absl",
    ]
  }
}

source_set("unittests") {
  testonly = true

  sources = [
    "client_storage_unittest.cc",
    "embedded_policy_test_server_test_base.cc",
    "embedded_policy_test_server_test_base.h",
    "embedded_policy_test_server_unittest.cc",
    "policy_storage_unittest.cc",
    "remote_commands_state_unittest.cc",
    "request_handler_for_api_authorization_unittest.cc",
    "request_handler_for_auto_enrollment_unittest.cc",
    "request_handler_for_browser_public_key_upload_unittest.cc",
    "request_handler_for_cert_upload_unittest.cc",
    "request_handler_for_check_android_management_unittest.cc",
    "request_handler_for_check_user_account_unittest.cc",
    "request_handler_for_chrome_desktop_report_unittest.cc",
    "request_handler_for_client_cert_provisioning_unittest.cc",
    "request_handler_for_determine_promotion_eligibility_unittest.cc",
    "request_handler_for_device_attribute_update_permission_unittest.cc",
    "request_handler_for_device_attribute_update_unittest.cc",
    "request_handler_for_device_initial_enrollment_state_unittest.cc",
    "request_handler_for_device_state_retrieval_unittest.cc",
    "request_handler_for_policy_unittest.cc",
    "request_handler_for_register_browser_unittest.cc",
    "request_handler_for_register_cert_based_unittest.cc",
    "request_handler_for_register_device_and_user_unittest.cc",
    "request_handler_for_remote_commands_unittest.cc",
    "request_handler_for_status_upload_unittest.cc",
    "request_handler_for_unregister_unittest.cc",
    "request_handler_for_upload_euicc_info_unittest.cc",
    "signature_provider_unittest.cc",
  ]

  if (is_chromeos) {
    sources += [ "fake_dmserver_unittest.cc" ]
    sources += [ "request_handler_for_psm_auto_enrollment_unittest.cc" ]
  }

  deps = [
    ":test_support",
    "//components/policy/core/common:common_constants",
    "//components/policy/core/common:test_support",
    "//components/policy/proto",
    "//services/network:test_support",
    "//services/network/public/cpp",
    "//services/network/public/mojom",
    "//third_party/abseil-cpp:absl",
  ]
}