mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-12-01 01:36:09 +03:00
269 lines
8.0 KiB
Plaintext
269 lines
8.0 KiB
Plaintext
# Copyright 2017 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("//mojo/public/tools/bindings/mojom.gni")
|
|
import("//services/catalog/public/tools/catalog.gni")
|
|
import("//services/service_manager/public/cpp/service.gni")
|
|
import("//services/service_manager/public/service_manifest.gni")
|
|
import("//services/service_manager/public/tools/test/service_test.gni")
|
|
|
|
component("network_service") {
|
|
sources = [
|
|
"chunked_data_pipe_upload_data_stream.cc",
|
|
"chunked_data_pipe_upload_data_stream.h",
|
|
"conditional_cache_deletion_helper.cc",
|
|
"conditional_cache_deletion_helper.h",
|
|
"cookie_manager.cc",
|
|
"cookie_manager.h",
|
|
"cors/cors_url_loader.cc",
|
|
"cors/cors_url_loader.h",
|
|
"cors/cors_url_loader_factory.cc",
|
|
"cors/cors_url_loader_factory.h",
|
|
"cors/preflight_controller.cc",
|
|
"cors/preflight_controller.h",
|
|
"cross_origin_read_blocking.cc",
|
|
"cross_origin_read_blocking.h",
|
|
"data_pipe_element_reader.cc",
|
|
"data_pipe_element_reader.h",
|
|
"http_cache_data_remover.cc",
|
|
"http_cache_data_remover.h",
|
|
"http_server_properties_pref_delegate.cc",
|
|
"http_server_properties_pref_delegate.h",
|
|
"ignore_errors_cert_verifier.cc",
|
|
"ignore_errors_cert_verifier.h",
|
|
"keepalive_statistics_recorder.cc",
|
|
"keepalive_statistics_recorder.h",
|
|
"loader_util.cc",
|
|
"loader_util.h",
|
|
"mojo_net_log.cc",
|
|
"mojo_net_log.h",
|
|
"network_change_manager.cc",
|
|
"network_change_manager.h",
|
|
"network_context.cc",
|
|
"network_context.h",
|
|
"network_sandbox_hook_linux.cc",
|
|
"network_sandbox_hook_linux.h",
|
|
"network_sandbox_win.cc",
|
|
"network_sandbox_win.h",
|
|
"network_service.cc",
|
|
"network_service.h",
|
|
"network_service_network_delegate.cc",
|
|
"network_service_network_delegate.h",
|
|
"network_usage_accumulator.cc",
|
|
"network_usage_accumulator.h",
|
|
"proxy_config_service_mojo.cc",
|
|
"proxy_config_service_mojo.h",
|
|
"proxy_resolving_client_socket.cc",
|
|
"proxy_resolving_client_socket.h",
|
|
"proxy_resolving_client_socket_factory.cc",
|
|
"proxy_resolving_client_socket_factory.h",
|
|
"resource_scheduler.cc",
|
|
"resource_scheduler.h",
|
|
"resource_scheduler_client.cc",
|
|
"resource_scheduler_client.h",
|
|
"resource_scheduler_params_manager.cc",
|
|
"resource_scheduler_params_manager.h",
|
|
"restricted_cookie_manager.cc",
|
|
"restricted_cookie_manager.h",
|
|
"socket_data_pump.cc",
|
|
"socket_data_pump.h",
|
|
"socket_factory.cc",
|
|
"socket_factory.h",
|
|
"ssl_config_service_mojo.cc",
|
|
"ssl_config_service_mojo.h",
|
|
"ssl_config_type_converter.cc",
|
|
"ssl_config_type_converter.h",
|
|
"tcp_connected_socket.cc",
|
|
"tcp_connected_socket.h",
|
|
"tcp_server_socket.cc",
|
|
"tcp_server_socket.h",
|
|
"throttling/network_conditions.cc",
|
|
"throttling/network_conditions.h",
|
|
"throttling/throttling_controller.cc",
|
|
"throttling/throttling_controller.h",
|
|
"throttling/throttling_network_interceptor.cc",
|
|
"throttling/throttling_network_interceptor.h",
|
|
"throttling/throttling_network_transaction.cc",
|
|
"throttling/throttling_network_transaction.h",
|
|
"throttling/throttling_network_transaction_factory.cc",
|
|
"throttling/throttling_network_transaction_factory.h",
|
|
"throttling/throttling_upload_data_stream.cc",
|
|
"throttling/throttling_upload_data_stream.h",
|
|
"tls_client_socket.cc",
|
|
"tls_client_socket.h",
|
|
"udp_socket.cc",
|
|
"udp_socket.h",
|
|
"upload_progress_tracker.cc",
|
|
"upload_progress_tracker.h",
|
|
"url_loader.cc",
|
|
"url_loader.h",
|
|
"url_loader_factory.cc",
|
|
"url_loader_factory.h",
|
|
"url_request_context_builder_mojo.cc",
|
|
"url_request_context_builder_mojo.h",
|
|
"url_request_context_owner.cc",
|
|
"url_request_context_owner.h",
|
|
]
|
|
|
|
if (!is_ios) {
|
|
sources += [
|
|
"websocket.cc",
|
|
"websocket.h",
|
|
"websocket_factory.cc",
|
|
"websocket_factory.h",
|
|
"websocket_throttler.cc",
|
|
"websocket_throttler.h",
|
|
]
|
|
}
|
|
|
|
deps = [
|
|
"//base",
|
|
"//components/certificate_transparency",
|
|
"//components/cookie_config",
|
|
"//components/network_session_configurator/browser",
|
|
"//components/network_session_configurator/common",
|
|
"//components/prefs",
|
|
"//mojo/public/cpp/bindings",
|
|
"//mojo/public/cpp/system",
|
|
"//net",
|
|
"//net:extras",
|
|
"//services/network/public/cpp",
|
|
"//services/network/public/mojom",
|
|
"//services/service_manager/public/cpp",
|
|
"//services/service_manager/public/mojom",
|
|
"//services/service_manager/sandbox:sandbox",
|
|
"//url",
|
|
]
|
|
|
|
if (is_linux) {
|
|
deps += [
|
|
"//sandbox/linux:sandbox_services",
|
|
"//services/service_manager/sandbox:sandbox",
|
|
]
|
|
}
|
|
|
|
if (is_win) {
|
|
deps += [ "//sandbox/win:sandbox" ]
|
|
}
|
|
|
|
# TODO(sdefresne): This depends on net's enable_net_mojo getting turned on for
|
|
# iOS, which depends on net_with_v8 as well. http://crbug.com/803149
|
|
if (!is_ios) {
|
|
sources += [
|
|
"proxy_resolver_factory_mojo.cc",
|
|
"proxy_resolver_factory_mojo.h",
|
|
"proxy_service_mojo.cc",
|
|
"proxy_service_mojo.h",
|
|
]
|
|
deps += [ "//net:net_browser_services" ]
|
|
}
|
|
|
|
defines = [ "IS_NETWORK_SERVICE_IMPL" ]
|
|
}
|
|
|
|
source_set("tests") {
|
|
testonly = true
|
|
|
|
sources = [
|
|
"chunked_data_pipe_upload_data_stream_unittest.cc",
|
|
"cookie_manager_unittest.cc",
|
|
"cors/cors_url_loader_unittest.cc",
|
|
"cors/preflight_controller_unittest.cc",
|
|
"cross_origin_read_blocking_unittest.cc",
|
|
"data_pipe_element_reader_unittest.cc",
|
|
"http_cache_data_remover_unittest.cc",
|
|
"ignore_errors_cert_verifier_unittest.cc",
|
|
"keepalive_statistics_recorder_unittest.cc",
|
|
"network_change_manager_unittest.cc",
|
|
"network_context_unittest.cc",
|
|
"network_service_unittest.cc",
|
|
"network_usage_accumulator_unittest.cc",
|
|
"proxy_config_service_mojo_unittest.cc",
|
|
"proxy_resolving_client_socket_unittest.cc",
|
|
"resource_scheduler_params_manager_unittest.cc",
|
|
"resource_scheduler_unittest.cc",
|
|
"restricted_cookie_manager_unittest.cc",
|
|
"socket_data_pump_unittest.cc",
|
|
"ssl_config_service_mojo_unittest.cc",
|
|
"tcp_socket_unittest.cc",
|
|
"test/test_url_loader_factory_unittest.cc",
|
|
"test_chunked_data_pipe_getter.cc",
|
|
"test_chunked_data_pipe_getter.h",
|
|
"throttling/throttling_controller_unittest.cc",
|
|
"tls_client_socket_unittest.cc",
|
|
"udp_socket_unittest.cc",
|
|
"upload_progress_tracker_unittest.cc",
|
|
"url_loader_unittest.cc",
|
|
]
|
|
|
|
if (!is_ios) {
|
|
sources += [
|
|
"network_context_cert_transparency_unittest.cc",
|
|
"proxy_resolver_factory_mojo_unittest.cc",
|
|
"websocket_throttler_unittest.cc",
|
|
]
|
|
}
|
|
|
|
deps = [
|
|
":network_service",
|
|
":test_support",
|
|
"//base",
|
|
"//components/certificate_transparency",
|
|
"//components/network_session_configurator/browser",
|
|
"//mojo/public/cpp/bindings",
|
|
"//mojo/public/cpp/system",
|
|
"//net",
|
|
"//net:test_support",
|
|
"//services/network/public/cpp",
|
|
"//services/network/public/mojom",
|
|
"//services/service_manager/public/cpp",
|
|
"//services/service_manager/public/cpp:service_test_support",
|
|
"//testing/gtest",
|
|
]
|
|
}
|
|
|
|
source_set("test_support") {
|
|
testonly = true
|
|
|
|
sources = [
|
|
"mojo_socket_test_util.cc",
|
|
"mojo_socket_test_util.h",
|
|
"test/test_data_pipe_getter.cc",
|
|
"test/test_data_pipe_getter.h",
|
|
"test/test_network_context.h",
|
|
"test/test_url_loader_client.cc",
|
|
"test/test_url_loader_client.h",
|
|
"test/test_url_loader_factory.cc",
|
|
"test/test_url_loader_factory.h",
|
|
"udp_socket_test_util.cc",
|
|
"udp_socket_test_util.h",
|
|
]
|
|
|
|
deps = [
|
|
"//base",
|
|
"//mojo/public/cpp/bindings",
|
|
"//net",
|
|
"//net:test_support",
|
|
"//services/network:network_service",
|
|
"//services/network/public/mojom",
|
|
"//testing/gtest",
|
|
]
|
|
}
|
|
|
|
service_manifest("manifest") {
|
|
name = "network"
|
|
source = "manifest.json"
|
|
}
|
|
|
|
service_manifest("unittest_manifest") {
|
|
name = "network_unittests"
|
|
source = "test/service_unittest_manifest.json"
|
|
packaged_services = [ ":manifest" ]
|
|
}
|
|
|
|
catalog("tests_catalog") {
|
|
testonly = true
|
|
embedded_services = [ ":unittest_manifest" ]
|
|
}
|