Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Side by Side Diff: net/base/network_change_notifier_mac.h

Issue 2896203003: [NetworkChangeNotifier] Return more specific network connection types (ethernet/wifi) on OSX (Closed)
Patch Set: Address issues from PS5 Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/base/network_change_notifier.cc ('k') | net/base/network_change_notifier_mac.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_ 5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_
6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_ 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_
7 7
8 #include <SystemConfiguration/SystemConfiguration.h> 8 #include <SystemConfiguration/SystemConfiguration.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 30 matching lines...) Expand all
41 void OnNetworkConfigChange(CFArrayRef changed_keys) override; 41 void OnNetworkConfigChange(CFArrayRef changed_keys) override;
42 42
43 private: 43 private:
44 NetworkChangeNotifierMac* const net_config_watcher_; 44 NetworkChangeNotifierMac* const net_config_watcher_;
45 DISALLOW_COPY_AND_ASSIGN(Forwarder); 45 DISALLOW_COPY_AND_ASSIGN(Forwarder);
46 }; 46 };
47 47
48 private: 48 private:
49 class DnsConfigServiceThread; 49 class DnsConfigServiceThread;
50 50
51 // Called on the main thread on startup, afterwards on the notifier thread.
52 static ConnectionType CalculateConnectionType(SCNetworkConnectionFlags flags);
53
51 // Methods directly called by the NetworkConfigWatcherMac::Delegate: 54 // Methods directly called by the NetworkConfigWatcherMac::Delegate:
52 void StartReachabilityNotifications(); 55 void StartReachabilityNotifications();
53 void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store); 56 void SetDynamicStoreNotificationKeys(SCDynamicStoreRef store);
54 void OnNetworkConfigChange(CFArrayRef changed_keys); 57 void OnNetworkConfigChange(CFArrayRef changed_keys);
55 58
56 void SetInitialConnectionType(); 59 void SetInitialConnectionType();
57 60
58 static void ReachabilityCallback(SCNetworkReachabilityRef target, 61 static void ReachabilityCallback(SCNetworkReachabilityRef target,
59 SCNetworkConnectionFlags flags, 62 SCNetworkConnectionFlags flags,
60 void* notifier); 63 void* notifier);
(...skipping 13 matching lines...) Expand all
74 std::unique_ptr<const NetworkConfigWatcherMac> config_watcher_; 77 std::unique_ptr<const NetworkConfigWatcherMac> config_watcher_;
75 78
76 std::unique_ptr<DnsConfigServiceThread> dns_config_service_thread_; 79 std::unique_ptr<DnsConfigServiceThread> dns_config_service_thread_;
77 80
78 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierMac); 81 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifierMac);
79 }; 82 };
80 83
81 } // namespace net 84 } // namespace net
82 85
83 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_ 86 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_MAC_H_
OLDNEW
« no previous file with comments | « net/base/network_change_notifier.cc ('k') | net/base/network_change_notifier_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698