| Index: net/base/network_change_notifier_mac.h
|
| diff --git a/net/base/network_change_notifier_mac.h b/net/base/network_change_notifier_mac.h
|
| index ec2bb1fed50e97c42be5bf424f01e8e9117f9546..1db267c5b30ccb83a7494efb8fdaa3a90acf1e03 100644
|
| --- a/net/base/network_change_notifier_mac.h
|
| +++ b/net/base/network_change_notifier_mac.h
|
| @@ -14,6 +14,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/synchronization/condition_variable.h"
|
| #include "base/synchronization/lock.h"
|
| +#include "net/base/file_path_watcher_callback.h"
|
| #include "net/base/network_change_notifier.h"
|
| #include "net/base/network_config_watcher_mac.h"
|
|
|
| @@ -24,9 +25,11 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
|
| NetworkChangeNotifierMac();
|
| virtual ~NetworkChangeNotifierMac();
|
|
|
| - // NetworkChangeNotifier implementation:
|
| + // NetworkChangeNotifier:
|
| virtual bool IsCurrentlyOffline() const OVERRIDE;
|
|
|
| + virtual bool IsCurrentlyWatchingDNS() const OVERRIDE;
|
| +
|
| private:
|
| enum OnlineState {
|
| UNINITIALIZED = -1,
|
| @@ -66,6 +69,9 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
|
| void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store);
|
| void OnNetworkConfigChange(CFArrayRef changed_keys);
|
|
|
| + // Called from FilePathWatcherCallback.
|
| + void OnDNSFileChanged(unsigned detail, bool watch_success);
|
| +
|
| void SetInitialState();
|
|
|
| static void ReachabilityCallback(SCNetworkReachabilityRef target,
|
| @@ -83,6 +89,13 @@ class NetworkChangeNotifierMac: public NetworkChangeNotifier {
|
| Forwarder forwarder_;
|
| scoped_ptr<const NetworkConfigWatcherMac> config_watcher_;
|
|
|
| + // DNS watchers and state.
|
| + FilePathWatcherCallback resolv_watcher_;
|
| + FilePathWatcherCallback hosts_watcher_;
|
| +
|
| + bool watching_dns_;
|
| + mutable base::Lock watching_dns_lock_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierMac);
|
| };
|
|
|
|
|