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.h", 41 "util.cc", 42 "util.h", 43 ] 44 45 if (is_posix && !is_android) { 46 sources += [ 47 "resolv_reader.cc", 48 "resolv_reader.h", 49 "scoped_res_state.cc", 50 "scoped_res_state.h", 51 ] 52 } 53 54 if (is_win) { 55 sources += [ 56 "win_dns_system_settings.cc", 57 "win_dns_system_settings.h", 58 ] 59 } 60 61 deps = [ "//net:net_deps" ] 62 63 public_deps = [ "//net:net_public_deps" ] 64} 65 66if (is_android) { 67 java_cpp_enum("secure_dns_mode_generated_enum") { 68 sources = [ "secure_dns_mode.h" ] 69 } 70} 71 72source_set("tests") { 73 testonly = true 74 sources = [ 75 "dns_over_https_config_unittest.cc", 76 "dns_over_https_server_config_unittest.cc", 77 "doh_provider_entry_unittest.cc", 78 ] 79 80 if (is_posix && !is_android) { 81 sources += [ "resolv_reader_unittest.cc" ] 82 } 83 84 if (is_win) { 85 sources += [ "win_dns_system_settings_unittest.cc" ] 86 } 87 88 deps = [ 89 "//net", 90 "//testing/gmock", 91 "//testing/gtest", 92 ] 93} 94