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