1 // Copyright 2014 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 5 #include "base/callback_forward.h" 6 #include "net/dns/dns_config_service_posix.h" 7 #include "net/dns/notify_watcher_mac.h" 8 9 namespace net { 10 namespace internal { 11 12 // Watches DNS configuration on Mac. 13 class DnsConfigWatcher { 14 public: 15 bool Watch(const base::Callback<void(bool succeeded)>& callback); 16 17 // Returns an error if the DNS configuration is invalid. 18 // Returns CONFIG_PARSE_POSIX_OK otherwise. 19 static ConfigParsePosixResult CheckDnsConfig(); 20 21 private: 22 NotifyWatcherMac watcher_; 23 }; 24 25 } // namespace internal 26 } // namespace net 27