mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 08:16:09 +03:00
173 lines
4.3 KiB
Plaintext
173 lines
4.3 KiB
Plaintext
# 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")
|
|
import("//tools/json_to_struct/json_to_struct.gni")
|
|
if (is_android) {
|
|
import("//build/config/android/config.gni")
|
|
import("//build/config/android/rules.gni")
|
|
}
|
|
|
|
static_library("search_engines") {
|
|
sources = [
|
|
"default_search_manager.cc",
|
|
"default_search_manager.h",
|
|
"keyword_table.cc",
|
|
"keyword_table.h",
|
|
"keyword_web_data_service.cc",
|
|
"keyword_web_data_service.h",
|
|
"search_engine_data_type_controller.cc",
|
|
"search_engine_data_type_controller.h",
|
|
"search_engine_type.h",
|
|
"search_engines_pref_names.cc",
|
|
"search_engines_pref_names.h",
|
|
"search_engines_switches.cc",
|
|
"search_engines_switches.h",
|
|
"search_host_to_urls_map.cc",
|
|
"search_host_to_urls_map.h",
|
|
"search_terms_data.cc",
|
|
"search_terms_data.h",
|
|
"template_url.cc",
|
|
"template_url.h",
|
|
"template_url_data.cc",
|
|
"template_url_data.h",
|
|
"template_url_data_util.cc",
|
|
"template_url_data_util.h",
|
|
"template_url_fetcher.cc",
|
|
"template_url_fetcher.h",
|
|
"template_url_id.h",
|
|
"template_url_parser.cc",
|
|
"template_url_parser.h",
|
|
"template_url_prepopulate_data.cc",
|
|
"template_url_prepopulate_data.h",
|
|
"template_url_service.cc",
|
|
"template_url_service.h",
|
|
"template_url_service_client.h",
|
|
"template_url_service_observer.h",
|
|
"util.cc",
|
|
"util.h",
|
|
]
|
|
|
|
public_deps = [
|
|
"//base",
|
|
"//components/google/core/browser",
|
|
"//components/keyed_service/core",
|
|
"//components/prefs",
|
|
"//components/sync",
|
|
"//components/webdata/common",
|
|
"//third_party/metrics_proto",
|
|
]
|
|
|
|
deps = [
|
|
":prepopulated_engines",
|
|
"//base:i18n",
|
|
"//components/history/core/browser",
|
|
"//third_party/metrics_proto",
|
|
|
|
# The search_engines target is in an include cycle with
|
|
# components/omnibox/browser. The cycle is whitelisted in the
|
|
# omnibox/browser target, but should ideally be fixed, then this
|
|
# dependency added:
|
|
#"//components/omnibox/browser",
|
|
"//components/infobars/core",
|
|
"//components/pref_registry",
|
|
"//components/rappor",
|
|
"//components/strings",
|
|
"//components/url_formatter",
|
|
"//google_apis",
|
|
"//net",
|
|
"//sql",
|
|
"//third_party/libxml",
|
|
"//ui/base",
|
|
"//ui/gfx",
|
|
"//ui/gfx/geometry",
|
|
"//url",
|
|
]
|
|
|
|
if (!is_ios) {
|
|
sources += [
|
|
"default_search_policy_handler.cc",
|
|
"default_search_policy_handler.h",
|
|
]
|
|
deps += [
|
|
"//components/policy:generated",
|
|
"//components/policy/core/browser",
|
|
]
|
|
}
|
|
}
|
|
|
|
static_library("test_support") {
|
|
testonly = true
|
|
sources = [
|
|
"search_engines_test_util.cc",
|
|
"search_engines_test_util.h",
|
|
"testing_search_terms_data.cc",
|
|
"testing_search_terms_data.h",
|
|
]
|
|
|
|
public_deps = [
|
|
":search_engines",
|
|
"//base",
|
|
"//components/sync_preferences:test_support",
|
|
"//testing/gtest",
|
|
]
|
|
}
|
|
|
|
source_set("unit_tests") {
|
|
testonly = true
|
|
sources = [
|
|
"default_search_manager_unittest.cc",
|
|
"keyword_table_unittest.cc",
|
|
"search_engine_data_type_controller_unittest.cc",
|
|
"search_host_to_urls_map_unittest.cc",
|
|
"template_url_prepopulate_data_unittest.cc",
|
|
"template_url_service_util_unittest.cc",
|
|
"template_url_unittest.cc",
|
|
]
|
|
|
|
deps = [
|
|
":prepopulated_engines",
|
|
":test_support",
|
|
"//base",
|
|
"//base/test:test_support",
|
|
"//components/google/core/browser",
|
|
"//components/pref_registry:pref_registry",
|
|
"//components/prefs",
|
|
"//components/sync:test_support_driver",
|
|
"//components/sync:test_support_model",
|
|
"//components/sync_preferences:test_support",
|
|
"//components/webdata/common",
|
|
"//net:net",
|
|
"//sql",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
"//url",
|
|
]
|
|
|
|
if (!is_ios) {
|
|
sources += [ "default_search_policy_handler_unittest.cc" ]
|
|
|
|
deps += [
|
|
"//components/policy:generated",
|
|
"//components/policy/core/browser:test_support",
|
|
]
|
|
}
|
|
}
|
|
|
|
json_to_struct("prepopulated_engines") {
|
|
visibility = [ ":*" ]
|
|
|
|
source = "prepopulated_engines.json"
|
|
schema_file = "prepopulated_engines_schema.json"
|
|
namespace = "TemplateURLPrepopulateData"
|
|
}
|
|
|
|
if (is_android) {
|
|
java_cpp_enum("search_engine_type_java") {
|
|
sources = [
|
|
"search_engine_type.h",
|
|
]
|
|
}
|
|
}
|