// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_DNS_TEST_DNS_CONFIG_SERVICE_H_ #define NET_DNS_TEST_DNS_CONFIG_SERVICE_H_ #include <memory> #include <optional> #include <utility> #include "base/check.h" #include "base/functional/callback.h" #include "net/base/net_export.h" #include "net/dns/dns_config_service.h" namespace net { class DnsHostsParser; // Simple test implementation of DnsConfigService that will trigger // notifications only on explicitly calling On...() methods. class NET_EXPORT_PRIVATE TestDnsConfigService : public DnsConfigService { … }; // Test implementation of `DnsConfigService` that exercises the // `DnsConfigService::HostsReader`. Uses an injected `DnsHostsParser`. `Watcher` // change notifications are simulated using `TriggerHostsChangeNotification()`. class NET_EXPORT_PRIVATE HostsReadingTestDnsConfigService : public TestDnsConfigService { … }; } // namespace net #endif // NET_DNS_TEST_DNS_CONFIG_SERVICE_H_