// Copyright 2012 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_HOST_RESOLVER_PROC_H_ #define NET_DNS_HOST_RESOLVER_PROC_H_ #include <string> #include "base/memory/ref_counted.h" #include "net/base/address_family.h" #include "net/base/net_export.h" #include "net/base/network_handle.h" namespace net { class AddressList; // Interface for a getaddrinfo()-like procedure. This is used by tests // to control the underlying resolutions in HostResolverManager. // HostResolverProcs can be chained together; they fallback to the next // procedure in the chain by calling ResolveUsingPrevious(). Unless // `allow_fallback_to_system_or_default` is set to false, `default_proc_` // (set via SetDefault()) is added to the end of the chain and the actual system // resolver acts as the final fallback after the default proc. // // Note that implementations of HostResolverProc *MUST BE THREADSAFE*, since // the HostResolver implementation using them can be multi-threaded. class NET_EXPORT HostResolverProc : public base::RefCountedThreadSafe<HostResolverProc> { … }; } // namespace net #endif // NET_DNS_HOST_RESOLVER_PROC_H_