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

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

Issue 1897033002: Reland 'Convert //net and //chromecast to std::unordered_*' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix TestDownloadRequestHandler Created 4 years, 8 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_linux.cc ('k') | net/base/network_interfaces_linux.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) 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 #ifndef NET_BASE_NETWORK_INTERFACES_LINUX_H_ 5 #ifndef NET_BASE_NETWORK_INTERFACES_LINUX_H_
6 #define NET_BASE_NETWORK_INTERFACES_LINUX_H_ 6 #define NET_BASE_NETWORK_INTERFACES_LINUX_H_
7 7
8 // This file is only used to expose some of the internals 8 // This file is only used to expose some of the internals
9 // of network_interfaces_linux.cc to address_tracker_linux and tests. 9 // of network_interfaces_linux.cc to address_tracker_linux and tests.
10 10
11 #include <string> 11 #include <string>
12 #include <unordered_set>
12 13
13 #include "base/containers/hash_tables.h"
14 #include "net/base/address_tracker_linux.h" 14 #include "net/base/address_tracker_linux.h"
15 #include "net/base/network_interfaces.h" 15 #include "net/base/network_interfaces.h"
16 16
17 namespace net { 17 namespace net {
18 namespace internal { 18 namespace internal {
19 19
20 typedef char* (*GetInterfaceNameFunction)(int interface_index, char* ifname); 20 typedef char* (*GetInterfaceNameFunction)(int interface_index, char* ifname);
21 21
22 typedef std::string (*GetInterfaceSSIDFunction)(const std::string& ifname); 22 typedef std::string (*GetInterfaceSSIDFunction)(const std::string& ifname);
23 23
24 NET_EXPORT bool GetNetworkListImpl( 24 NET_EXPORT bool GetNetworkListImpl(
25 NetworkInterfaceList* networks, 25 NetworkInterfaceList* networks,
26 int policy, 26 int policy,
27 const base::hash_set<int>& online_links, 27 const std::unordered_set<int>& online_links,
28 const internal::AddressTrackerLinux::AddressMap& address_map, 28 const internal::AddressTrackerLinux::AddressMap& address_map,
29 GetInterfaceNameFunction get_interface_name); 29 GetInterfaceNameFunction get_interface_name);
30 30
31 // Gets the current Wi-Fi SSID based on |interfaces|. Returns 31 // Gets the current Wi-Fi SSID based on |interfaces|. Returns
32 // empty string if there are no interfaces or if two interfaces have different 32 // empty string if there are no interfaces or if two interfaces have different
33 // connection types. Otherwise returns the SSID of all interfaces if they have 33 // connection types. Otherwise returns the SSID of all interfaces if they have
34 // the same SSID. This is adapted from 34 // the same SSID. This is adapted from
35 // NetworkChangeNotifier::ConnectionTypeFromInterfaceList. 35 // NetworkChangeNotifier::ConnectionTypeFromInterfaceList.
36 NET_EXPORT std::string GetWifiSSIDFromInterfaceListInternal( 36 NET_EXPORT std::string GetWifiSSIDFromInterfaceListInternal(
37 const NetworkInterfaceList& interfaces, 37 const NetworkInterfaceList& interfaces,
38 internal::GetInterfaceSSIDFunction get_interface_ssid); 38 internal::GetInterfaceSSIDFunction get_interface_ssid);
39 39
40 } // namespace internal 40 } // namespace internal
41 } // namespace net 41 } // namespace net
42 42
43 #endif // NET_BASE_NETWORK_INTERFACES_LINUX_H_ 43 #endif // NET_BASE_NETWORK_INTERFACES_LINUX_H_
OLDNEW
« no previous file with comments | « net/base/network_change_notifier_linux.cc ('k') | net/base/network_interfaces_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698