# Copyright 2016 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("//components/safe_browsing/buildflags.gni")
import("//mojo/public/tools/bindings/mojom.gni")
static_library("safe_browsing_prefs") {
sources = [
"safe_browsing_prefs.cc",
"safe_browsing_prefs.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
":features",
"//components/pref_registry:pref_registry",
"//components/prefs",
"//net:net",
]
public_deps = [ "//base" ]
}
source_set("safe_browsing_policy_handler") {
sources = [
"safe_browsing_policy_handler.cc",
"safe_browsing_policy_handler.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
":safe_browsing_prefs",
"//base:base",
"//components/policy:generated",
"//components/policy/core/browser",
"//components/prefs",
"//components/strings:components_strings_grit",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"safe_browsing_policy_handler_unittest.cc",
"safe_browsing_prefs_unittest.cc",
"scheme_logger_unittest.cc",
"utils_unittest.cc",
]
deps = [
":common",
":safe_browsing_policy_handler",
":safe_browsing_prefs",
"//base:base",
"//base/test:test_support",
"//components/policy/core/browser:browser",
"//components/policy/core/browser:test_support",
"//components/prefs:test_support",
"//testing/gtest",
"//url:url",
]
if (is_ios) {
deps += [ "//components/test:safe_browsing_test_bundle_data" ]
}
}
source_set("common") {
sources = [
"safe_browsing_settings_metrics.cc",
"safe_browsing_settings_metrics.h",
"safebrowsing_constants.cc",
"safebrowsing_constants.h",
"safebrowsing_referral_methods.h",
"safebrowsing_switches.cc",
"safebrowsing_switches.h",
"scheme_logger.cc",
"scheme_logger.h",
"utils.cc",
"utils.h",
"web_ui_constants.cc",
"web_ui_constants.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
"//base",
"//build:chromeos_buildflags",
"//components/policy/core/browser:browser",
"//components/prefs:prefs",
"//components/safe_browsing:buildflags",
"//components/safe_browsing/core/browser/db:hit_report",
"//components/safe_browsing/core/common/proto:csd_proto",
"//components/security_interstitials/core:unsafe_resource",
"//components/variations",
"//crypto:crypto",
"//ipc",
"//net",
"//services/network/public/mojom",
"//url/ipc:url_ipc",
]
public_deps = [
":features",
":interfaces",
]
}
source_set("features") {
sources = [
"features.cc",
"features.h",
]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
deps = [
"//base",
"//build:chromeos_buildflags",
"//components/safe_browsing:buildflags",
]
}
mojom("interfaces") {
sources = [ "safe_browsing_url_checker.mojom" ]
public_deps = [ "//url/mojom:url_mojom_gurl" ]
}