OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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_interfaces_linux.h" | 5 #include "net/base/network_interfaces_linux.h" |
6 | 6 |
7 #if !defined(OS_ANDROID) | 7 #if !defined(OS_ANDROID) |
8 #include <linux/ethtool.h> | 8 #include <linux/ethtool.h> |
9 #endif // !defined(OS_ANDROID) | 9 #endif // !defined(OS_ANDROID) |
10 #include <linux/if.h> | 10 #include <linux/if.h> |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 return false; | 208 return false; |
209 | 209 |
210 internal::AddressTrackerLinux tracker; | 210 internal::AddressTrackerLinux tracker; |
211 tracker.Init(); | 211 tracker.Init(); |
212 | 212 |
213 return internal::GetNetworkListImpl( | 213 return internal::GetNetworkListImpl( |
214 networks, policy, tracker.GetOnlineLinks(), tracker.GetAddressMap(), | 214 networks, policy, tracker.GetOnlineLinks(), tracker.GetAddressMap(), |
215 &internal::AddressTrackerLinux::GetInterfaceName); | 215 &internal::AddressTrackerLinux::GetInterfaceName); |
216 } | 216 } |
217 | 217 |
218 #if !defined(OS_ANDROID) | |
219 std::string GetWifiSSID() { | 218 std::string GetWifiSSID() { |
220 NetworkInterfaceList networks; | 219 NetworkInterfaceList networks; |
221 if (GetNetworkList(&networks, INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES)) { | 220 if (GetNetworkList(&networks, INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES)) { |
222 return internal::GetWifiSSIDFromInterfaceListInternal( | 221 return internal::GetWifiSSIDFromInterfaceListInternal( |
223 networks, internal::GetInterfaceSSID); | 222 networks, internal::GetInterfaceSSID); |
224 } | 223 } |
225 return ""; | 224 return ""; |
226 } | 225 } |
227 #endif // !defined(OS_ANDROID) | |
228 | 226 |
229 } // namespace net | 227 } // namespace net |
OLD | NEW |