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 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
|
# 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")
group("browser") {
if (is_component_build) {
public_deps = [ "//components/policy" ]
} else {
public_deps = [ ":internal" ]
}
}
source_set("internal") {
visibility = [ "//components/policy/*" ]
sources = [
"boolean_disabling_policy_handler.cc",
"boolean_disabling_policy_handler.h",
"browser_policy_connector.cc",
"browser_policy_connector.h",
"browser_policy_connector_base.cc",
"browser_policy_connector_base.h",
"cloud/message_util.cc",
"cloud/message_util.h",
"configuration_policy_handler.cc",
"configuration_policy_handler.h",
"configuration_policy_handler_list.cc",
"configuration_policy_handler_list.h",
"configuration_policy_pref_store.cc",
"configuration_policy_pref_store.h",
"gen_ai_default_settings_policy_handler.cc",
"gen_ai_default_settings_policy_handler.h",
"policy_conversions.cc",
"policy_conversions.h",
"policy_conversions_client.cc",
"policy_conversions_client.h",
"policy_data_utils.cc",
"policy_data_utils.h",
"policy_error_map.cc",
"policy_error_map.h",
"remote_commands/user_remote_commands_service_base.cc",
"remote_commands/user_remote_commands_service_base.h",
"signin/profile_separation_policies.cc",
"signin/profile_separation_policies.h",
"signin/user_cloud_signin_restriction_policy_fetcher.cc",
"signin/user_cloud_signin_restriction_policy_fetcher.h",
"url_allowlist_policy_handler.cc",
"url_allowlist_policy_handler.h",
"url_blocklist_manager.cc",
"url_blocklist_manager.h",
"url_blocklist_policy_handler.cc",
"url_blocklist_policy_handler.h",
"url_scheme_list_policy_handler.cc",
"url_scheme_list_policy_handler.h",
"webui/json_generation.cc",
"webui/json_generation.h",
"webui/machine_level_user_cloud_policy_status_provider.cc",
"webui/machine_level_user_cloud_policy_status_provider.h",
"webui/policy_status_provider.cc",
"webui/policy_status_provider.h",
"webui/policy_webui_constants.cc",
"webui/policy_webui_constants.h",
"webui/statistics_collector.cc",
"webui/statistics_collector.h",
]
if (!is_chromeos) {
sources += [
"cloud/user_policy_signin_service_base.cc",
"cloud/user_policy_signin_service_base.h",
"cloud/user_policy_signin_service_util.cc",
"cloud/user_policy_signin_service_util.h",
]
}
configs += [ "//components/policy:component_implementation" ]
public_deps = [ "//base" ]
deps = [
"//build:branding_buildflags",
"//components/google/core/common",
"//components/invalidation/impl",
"//components/keyed_service/core",
"//components/pref_registry",
"//components/prefs",
"//components/reporting/proto:record_proto",
"//components/signin/public/identity_manager:identity_manager",
"//components/strings",
"//components/url_formatter",
"//components/url_matcher",
"//components/version_info",
"//extensions/buildflags",
"//net",
"//services/network/public/cpp",
"//third_party/re2",
"//ui/base",
"//url",
]
if (is_android) {
sources += [
"android/policy_cache_updater_android.cc",
"android/policy_cache_updater_android.h",
]
deps += [ "//components/policy/android:jni_headers" ]
}
public_deps += [ "//components/policy/core/common:internal" ]
deps += [
"//google_apis",
"//net",
"//third_party/icu",
]
}
static_library("test_support") {
testonly = true
sources = [
"configuration_policy_pref_store_test.cc",
"configuration_policy_pref_store_test.h",
]
public_deps = [
":browser",
"//base",
# Explicitly link in the generated policy target into the test support
# so it will be linked to dependent targets. Otherwise in component
# build, it will be hidden inside the policy component.
"//components/policy:generated",
"//components/policy/core/common:test_support",
]
deps = [ "//testing/gtest" ]
}
# This is separate from the test_support target, so that only the test binaries
# that actually run pref_mapping tests can pull these, but other test binaries
# won't have these unnecessary dependencies.
source_set("pref_mapping_test_support") {
testonly = true
sources = [
"policy_pref_mapping_test.cc",
"policy_pref_mapping_test.h",
]
public_deps = [ ":test_support" ]
deps = [
"//base",
"//build:android_buildflags",
"//build:branding_buildflags",
"//components/policy:generated",
"//components/policy/core/common:test_support",
"//components/prefs",
"//printing/buildflags",
"//testing/gtest",
"//third_party/abseil-cpp:absl",
"//url",
]
# The test data is under components/policy/test/data instead of
# chrome/test/data/ because components/policy/PRESUBMIT.py depends on it.
# This makes presubmit run when files are modified in that directory.
data = [ "//components/policy/test/data/pref_mapping/" ]
}
source_set("unit_tests") {
testonly = true
sources = [
"boolean_disabling_policy_handler_unittest.cc",
"configuration_policy_handler_list_unittest.cc",
"configuration_policy_handler_unittest.cc",
"configuration_policy_pref_store_unittest.cc",
"gen_ai_default_settings_policy_handler_unittest.cc",
"policy_conversions_client_unittest.cc",
"policy_error_map_unittest.cc",
"signin/user_cloud_signin_restriction_policy_fetcher_unittest.cc",
"url_allowlist_policy_handler_unittest.cc",
"url_blocklist_manager_unittest.cc",
"url_blocklist_policy_handler_unittest.cc",
"url_scheme_list_policy_handler_unittest.cc",
]
deps = [
":browser",
":test_support",
"//base",
"//components/policy:generated",
"//components/prefs:test_support",
"//components/signin/public/identity_manager:identity_manager",
"//components/signin/public/identity_manager:test_support",
"//components/url_formatter",
"//components/url_matcher",
"//google_apis",
"//net",
"//services/network:test_support",
"//testing/gmock",
"//testing/gtest",
"//ui/base",
"//url",
]
if (is_android) {
sources += [ "android/policy_cache_updater_android_unittest.cc" ]
deps += [ "//components/policy/android:test_jni_headers" ]
}
}
|