1# Copyright 2018 The Chromium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5if (is_android) { 6 import("//build/config/android/rules.gni") 7} 8 9source_set("public") { 10 # Due to circular dependencies, should only be depended on through //net. 11 # Limit visibility to //net and other source_sets with the same access 12 # restriction. 13 visibility = [ 14 "//net", 15 "//net/dns:dns_client", 16 "//net/dns:host_resolver", 17 "//net/dns:host_resolver_manager", 18 ] 19 20 sources = [ 21 "dns_config_overrides.cc", 22 "dns_config_overrides.h", 23 "dns_over_https_config.cc", 24 "dns_over_https_config.h", 25 "dns_over_https_server_config.cc", 26 "dns_over_https_server_config.h", 27 "dns_protocol.h", 28 "dns_query_type.cc", 29 "dns_query_type.h", 30 "doh_provider_entry.cc", 31 "doh_provider_entry.h", 32 "host_resolver_results.cc", 33 "host_resolver_results.h", 34 "host_resolver_source.cc", 35 "host_resolver_source.h", 36 "mdns_listener_update_type.h", 37 "resolve_error_info.cc", 38 "resolve_error_info.h", 39 "secure_dns_mode.h", 40 "secure_dns_policy.cc", 41 "secure_dns_policy.h", 42 "util.cc", 43 "util.h", 44 ] 45 46 if (is_posix && !is_android) { 47 sources += [ 48 "resolv_reader.cc", 49 "resolv_reader.h", 50 "scoped_res_state.cc", 51 "scoped_res_state.h", 52 ] 53 } 54 55 if (is_win) { 56 sources += [ 57 "win_dns_system_settings.cc", 58 "win_dns_system_settings.h", 59 ] 60 } 61 62 deps = [ "//net:net_deps" ] 63 64 public_deps = [ "//net:net_public_deps" ] 65} 66 67if (is_android) { 68 java_cpp_enum("secure_dns_mode_generated_enum") { 69 sources = [ "secure_dns_mode.h" ] 70 } 71} 72 73source_set("tests") { 74 testonly = true 75 sources = [ 76 "dns_over_https_config_unittest.cc", 77 "dns_over_https_server_config_unittest.cc", 78 "doh_provider_entry_unittest.cc", 79 ] 80 81 if (is_posix && !is_android) { 82 sources += [ "resolv_reader_unittest.cc" ] 83 } 84 85 if (is_win) { 86 sources += [ "win_dns_system_settings_unittest.cc" ] 87 } 88 89 deps = [ 90 "//net", 91 "//testing/gmock", 92 "//testing/gtest", 93 ] 94} 95