OLD | NEW |
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 #include "net/base/network_change_notifier_mac.h" | 5 #include "net/base/network_change_notifier_mac.h" |
6 | 6 |
7 #include <netinet/in.h> | 7 #include <netinet/in.h> |
8 #include <resolv.h> | 8 #include <resolv.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 NetworkChangeNotifier::ConnectionType | 103 NetworkChangeNotifier::ConnectionType |
104 NetworkChangeNotifierMac::GetCurrentConnectionType() const { | 104 NetworkChangeNotifierMac::GetCurrentConnectionType() const { |
105 base::AutoLock lock(connection_type_lock_); | 105 base::AutoLock lock(connection_type_lock_); |
106 // Make sure the initial connection type is set before returning. | 106 // Make sure the initial connection type is set before returning. |
107 while (!connection_type_initialized_) { | 107 while (!connection_type_initialized_) { |
108 initial_connection_type_cv_.Wait(); | 108 initial_connection_type_cv_.Wait(); |
109 } | 109 } |
110 return connection_type_; | 110 return connection_type_; |
111 } | 111 } |
112 | 112 |
| 113 std::string NetworkChangeNotifierMac::GetCurrentWiFiSSID() const { |
| 114 // Not implemented. See https://crbug.com/451272 |
| 115 return ""; |
| 116 } |
| 117 |
113 void NetworkChangeNotifierMac::Forwarder::Init() { | 118 void NetworkChangeNotifierMac::Forwarder::Init() { |
114 net_config_watcher_->SetInitialConnectionType(); | 119 net_config_watcher_->SetInitialConnectionType(); |
115 } | 120 } |
116 | 121 |
117 void NetworkChangeNotifierMac::Forwarder::StartReachabilityNotifications() { | 122 void NetworkChangeNotifierMac::Forwarder::StartReachabilityNotifications() { |
118 net_config_watcher_->StartReachabilityNotifications(); | 123 net_config_watcher_->StartReachabilityNotifications(); |
119 } | 124 } |
120 | 125 |
121 void NetworkChangeNotifierMac::Forwarder::SetDynamicStoreNotificationKeys( | 126 void NetworkChangeNotifierMac::Forwarder::SetDynamicStoreNotificationKeys( |
122 SCDynamicStoreRef store) { | 127 SCDynamicStoreRef store) { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 NotifyObserversOfConnectionTypeChange(); | 264 NotifyObserversOfConnectionTypeChange(); |
260 | 265 |
261 #if defined(OS_IOS) | 266 #if defined(OS_IOS) |
262 // On iOS, the SCDynamicStore API does not exist, and we use the reachability | 267 // On iOS, the SCDynamicStore API does not exist, and we use the reachability |
263 // API to detect IP address changes instead. | 268 // API to detect IP address changes instead. |
264 NotifyObserversOfIPAddressChange(); | 269 NotifyObserversOfIPAddressChange(); |
265 #endif // defined(OS_IOS) | 270 #endif // defined(OS_IOS) |
266 } | 271 } |
267 | 272 |
268 } // namespace net | 273 } // namespace net |
OLD | NEW |