| # 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 = [ |
| "cookie_manager.cc", |
| "cookie_manager.h", |
| "cors/preflight_controller.cc", |
| "cors/preflight_controller.h", |
| "data_pipe_element_reader.cc", |
| "data_pipe_element_reader.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", |
| "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_service.cc", |
| "network_service.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", |
| "restricted_cookie_manager.cc", |
| "restricted_cookie_manager.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", |
| "udp_socket.cc", |
| "udp_socket.h", |
| "udp_socket_factory.cc", |
| "udp_socket_factory.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", |
| ] |
| |
| deps = [ |
| "//base", |
| "//components/cookie_config", |
| "//components/network_session_configurator/browser", |
| "//components/network_session_configurator/common", |
| "//components/prefs", |
| "//mojo/common:common_base", |
| "//mojo/public/cpp/bindings", |
| "//net", |
| "//net:extras", |
| "//services/network/public/cpp", |
| "//services/network/public/mojom", |
| "//services/service_manager/public/cpp", |
| "//services/service_manager/public/mojom", |
| "//url", |
| ] |
| |
| if (is_linux) { |
| deps += [ |
| "//sandbox/linux:sandbox_services", |
| "//services/service_manager/sandbox: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 = [ |
| "cookie_manager_unittest.cc", |
| "cors/cors_url_loader_unittest.cc", |
| "cors/preflight_controller_unittest.cc", |
| "data_pipe_element_reader_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", |
| "proxy_config_service_mojo_unittest.cc", |
| "proxy_resolving_client_socket_unittest.cc", |
| "resource_scheduler_unittest.cc", |
| "restricted_cookie_manager_unittest.cc", |
| "test/test_url_loader_factory_unittest.cc", |
| "throttling/throttling_controller_unittest.cc", |
| "udp_socket_factory_unittest.cc", |
| "udp_socket_unittest.cc", |
| "upload_progress_tracker_unittest.cc", |
| "url_loader_unittest.cc", |
| ] |
| |
| if (!is_ios) { |
| sources += [ "proxy_resolver_factory_mojo_unittest.cc" ] |
| } |
| |
| deps = [ |
| ":network_service", |
| ":test_support", |
| "//base", |
| "//components/network_session_configurator/browser", |
| "//mojo/common:common_base", |
| "//mojo/public/cpp/bindings", |
| "//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 = [ |
| "test/test_data_pipe_getter.cc", |
| "test/test_data_pipe_getter.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" ] |
| } |