xref: /aosp_15_r20/external/cronet/net/dns/dns_config_watcher_mac.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2014 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 
5 #ifndef NET_DNS_DNS_CONFIG_WATCHER_MAC_H_
6 #define NET_DNS_DNS_CONFIG_WATCHER_MAC_H_
7 
8 #include "base/functional/callback_forward.h"
9 #include "net/dns/notify_watcher_mac.h"
10 
11 namespace net::internal {
12 
13 // Watches DNS configuration on Mac.
14 class DnsConfigWatcher {
15  public:
16   bool Watch(const base::RepeatingCallback<void(bool succeeded)>& callback);
17 
18   // Returns false iff a valid config could not be determined.
19   static bool CheckDnsConfig(bool& out_unhandled_options);
20 
21  private:
22   NotifyWatcherMac watcher_;
23 };
24 
25 }  // namespace net::internal
26 
27 #endif  // NET_DNS_DNS_CONFIG_WATCHER_MAC_H_
28