blob: 1dd72cc3c1817092c1b704a7c11294c6bfb20a8d [file] [log] [blame]
Avi Drissman64595482022-09-14 20:52:291// Copyright 2014 The Chromium Authors
[email protected]f79c5912014-01-17 00:27:502// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
bnc3698b0a02016-12-09 23:36:505#ifndef NET_DNS_DNS_CONFIG_WATCHER_MAC_H_
6#define NET_DNS_DNS_CONFIG_WATCHER_MAC_H_
7
Avi Drissman41c4a412023-01-11 22:45:378#include "base/functional/callback_forward.h"
[email protected]f79c5912014-01-17 00:27:509#include "net/dns/notify_watcher_mac.h"
10
Tsuyoshi Horo4f516be2022-06-14 11:53:1311namespace net::internal {
[email protected]f79c5912014-01-17 00:27:5012
13// Watches DNS configuration on Mac.
14class DnsConfigWatcher {
15 public:
Anna Malova82b5e9a2020-03-05 17:35:3516 bool Watch(const base::RepeatingCallback<void(bool succeeded)>& callback);
[email protected]f79c5912014-01-17 00:27:5017
Eric Orthf7ebdde2021-01-08 22:48:1418 // Returns false iff a valid config could not be determined.
Eric Orthd80e4142021-01-15 17:22:3019 static bool CheckDnsConfig(bool& out_unhandled_options);
[email protected]f79c5912014-01-17 00:27:5020
21 private:
22 NotifyWatcherMac watcher_;
23};
24
Tsuyoshi Horo4f516be2022-06-14 11:53:1325} // namespace net::internal
bnc3698b0a02016-12-09 23:36:5026
27#endif // NET_DNS_DNS_CONFIG_WATCHER_MAC_H_