dns_reloader.h 770 B

1234567891011121314151617181920212223
  1. // Copyright (c) 2011 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef NET_DNS_DNS_RELOADER_H_
  5. #define NET_DNS_DNS_RELOADER_H_
  6. #include "build/build_config.h"
  7. #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD)
  8. namespace net {
  9. // Call on the network thread before calling DnsReloaderMaybeReload() anywhere.
  10. void EnsureDnsReloaderInit();
  11. // Call on the worker thread before doing a DNS lookup to reload the
  12. // resolver for that thread by doing res_ninit() if required.
  13. void DnsReloaderMaybeReload();
  14. } // namespace net
  15. #endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD)
  16. #endif // NET_DNS_DNS_RELOADER_H_