blob: 58fd373e7623da16f84b24c29ff7c90a34043b74 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# 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 = [
"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",
"policy_conversions.cc",
"policy_conversions.h",
"policy_conversions_client.cc",
"policy_conversions_client.h",
"policy_error_map.cc",
"policy_error_map.h",
"proxy_policy_handler.cc",
"proxy_policy_handler.h",
"url_blocklist_manager.cc",
"url_blocklist_manager.h",
"url_blocklist_policy_handler.cc",
"url_blocklist_policy_handler.h",
"url_util.cc",
"url_util.h",
]
configs += [ "//components/policy:component_implementation" ]
public_deps = [ "//base" ]
deps = [
"//base/third_party/dynamic_annotations",
"//build:branding_buildflags",
"//build:chromeos_buildflags",
"//components/google/core/common",
"//components/keyed_service/core",
"//components/pref_registry",
"//components/prefs",
"//components/reporting/proto:record_proto",
"//components/strings",
"//components/url_formatter",
"//components/url_matcher",
"//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 += [
"//components/proxy_config",
"//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",
]
if (!is_android && !is_fuchsia) {
sources += [
"policy_pref_mapping_test.cc",
"policy_pref_mapping_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 = [
"//build:branding_buildflags",
"//build:chromeos_buildflags",
"//components/prefs",
"//testing/gtest",
"//url",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"browser_policy_connector_unittest.cc",
"configuration_policy_handler_list_unittest.cc",
"configuration_policy_handler_unittest.cc",
"configuration_policy_pref_store_unittest.cc",
"policy_error_map_unittest.cc",
"proxy_policy_handler_unittest.cc",
"url_blocklist_manager_unittest.cc",
"url_blocklist_policy_handler_unittest.cc",
"url_util_unittest.cc",
]
deps = [
":browser",
":test_support",
"//base",
"//components/policy:generated",
"//components/prefs:test_support",
"//components/proxy_config",
"//components/url_formatter",
"//google_apis",
"//net",
"//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" ]
}
}