* Remove web discovery disabled by policy pref * Remove Origin user check for WDP setting * Remove unused include
121 lines
3.0 KiB
Plaintext
121 lines
3.0 KiB
Plaintext
# Copyright (c) 2024 The Brave Authors. All rights reserved.
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
# You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
import("//brave/components/web_discovery/buildflags/buildflags.gni")
|
|
|
|
assert(enable_web_discovery_native)
|
|
|
|
static_library("browser") {
|
|
sources = [
|
|
"web_discovery_service.cc",
|
|
"web_discovery_service.h",
|
|
]
|
|
deps = [
|
|
":internal",
|
|
"//base",
|
|
"//brave/components/constants",
|
|
"//brave/components/web_discovery/common",
|
|
"//brave/components/web_discovery/common:mojom",
|
|
"//components/keyed_service/core",
|
|
"//components/prefs",
|
|
"//services/network/public/cpp",
|
|
]
|
|
}
|
|
|
|
source_set("internal") {
|
|
sources = [
|
|
"background_credential_helper.cc",
|
|
"background_credential_helper.h",
|
|
"content_scraper.cc",
|
|
"content_scraper.h",
|
|
"credential_manager.cc",
|
|
"credential_manager.h",
|
|
"credential_signer.h",
|
|
"double_fetcher.cc",
|
|
"double_fetcher.h",
|
|
"ecdh_aes.cc",
|
|
"ecdh_aes.h",
|
|
"hash_detection.cc",
|
|
"hash_detection.h",
|
|
"hash_detection_matrix.h",
|
|
"patterns.cc",
|
|
"patterns.h",
|
|
"payload_generator.cc",
|
|
"payload_generator.h",
|
|
"pref_names.h",
|
|
"privacy_guard.cc",
|
|
"privacy_guard.h",
|
|
"regex_util.cc",
|
|
"regex_util.h",
|
|
"reporter.cc",
|
|
"reporter.h",
|
|
"request_queue.cc",
|
|
"request_queue.h",
|
|
"rsa.cc",
|
|
"rsa.h",
|
|
"server_config_loader.cc",
|
|
"server_config_loader.h",
|
|
"signature_basename.cc",
|
|
"signature_basename.h",
|
|
"util.cc",
|
|
"util.h",
|
|
]
|
|
|
|
visibility = [
|
|
":*",
|
|
"//brave/browser/web_discovery:browser_tests",
|
|
]
|
|
|
|
deps = [
|
|
"anonymous_credentials",
|
|
"document_extractor",
|
|
"//base",
|
|
"//brave/brave_domains",
|
|
"//brave/components/brave_search/browser",
|
|
"//brave/components/constants",
|
|
"//brave/components/web_discovery/common",
|
|
"//brave/components/web_discovery/common:mojom",
|
|
"//components/prefs",
|
|
"//crypto",
|
|
"//extensions/buildflags",
|
|
"//net",
|
|
"//services/network/public/cpp",
|
|
"//third_party/boringssl",
|
|
"//third_party/re2",
|
|
"//third_party/zlib/google:compression_utils",
|
|
"//url",
|
|
]
|
|
}
|
|
|
|
source_set("unit_tests") {
|
|
testonly = true
|
|
sources = [
|
|
"credential_manager_unittest.cc",
|
|
"double_fetcher_unittest.cc",
|
|
"hash_detection_unittest.cc",
|
|
"patterns_unittest.cc",
|
|
"payload_generator_unittest.cc",
|
|
"privacy_guard_unittest.cc",
|
|
"reporter_unittest.cc",
|
|
"request_queue_unittest.cc",
|
|
"server_config_loader_unittest.cc",
|
|
"signature_basename_unittest.cc",
|
|
"web_discovery_service_unittest.cc",
|
|
]
|
|
deps = [
|
|
":browser",
|
|
":internal",
|
|
"//base/test:test_support",
|
|
"//brave/components/brave_search/browser",
|
|
"//brave/components/constants",
|
|
"//brave/components/web_discovery/common",
|
|
"//components/prefs:test_support",
|
|
"//crypto",
|
|
"//services/network:test_support",
|
|
"//services/network/public/cpp",
|
|
"//testing/gtest",
|
|
]
|
|
}
|