Avi Drissman | 6459548 | 2022-09-14 20:52:29 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors |
[email protected] | f79c591 | 2014-01-17 00:27:50 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
bnc | 3698b0a0 | 2016-12-09 23:36:50 | [diff] [blame] | 5 | #ifndef NET_DNS_DNS_CONFIG_WATCHER_MAC_H_ |
6 | #define NET_DNS_DNS_CONFIG_WATCHER_MAC_H_ | ||||
7 | |||||
Avi Drissman | 41c4a41 | 2023-01-11 22:45:37 | [diff] [blame^] | 8 | #include "base/functional/callback_forward.h" |
[email protected] | f79c591 | 2014-01-17 00:27:50 | [diff] [blame] | 9 | #include "net/dns/notify_watcher_mac.h" |
10 | |||||
Tsuyoshi Horo | 4f516be | 2022-06-14 11:53:13 | [diff] [blame] | 11 | namespace net::internal { |
[email protected] | f79c591 | 2014-01-17 00:27:50 | [diff] [blame] | 12 | |
13 | // Watches DNS configuration on Mac. | ||||
14 | class DnsConfigWatcher { | ||||
15 | public: | ||||
Anna Malova | 82b5e9a | 2020-03-05 17:35:35 | [diff] [blame] | 16 | bool Watch(const base::RepeatingCallback<void(bool succeeded)>& callback); |
[email protected] | f79c591 | 2014-01-17 00:27:50 | [diff] [blame] | 17 | |
Eric Orth | f7ebdde | 2021-01-08 22:48:14 | [diff] [blame] | 18 | // Returns false iff a valid config could not be determined. |
Eric Orth | d80e414 | 2021-01-15 17:22:30 | [diff] [blame] | 19 | static bool CheckDnsConfig(bool& out_unhandled_options); |
[email protected] | f79c591 | 2014-01-17 00:27:50 | [diff] [blame] | 20 | |
21 | private: | ||||
22 | NotifyWatcherMac watcher_; | ||||
23 | }; | ||||
24 | |||||
Tsuyoshi Horo | 4f516be | 2022-06-14 11:53:13 | [diff] [blame] | 25 | } // namespace net::internal |
bnc | 3698b0a0 | 2016-12-09 23:36:50 | [diff] [blame] | 26 | |
27 | #endif // NET_DNS_DNS_CONFIG_WATCHER_MAC_H_ |