Chromium Code Reviews| Index: net/base/address_tracker_linux.h |
| diff --git a/net/base/address_tracker_linux.h b/net/base/address_tracker_linux.h |
| index a960287d4ad2abd2270ace41cd6596b13b6b5a94..933f60447f2344f774a03b8a468c013b03ea1da4 100644 |
| --- a/net/base/address_tracker_linux.h |
| +++ b/net/base/address_tracker_linux.h |
| @@ -83,9 +83,10 @@ class NET_EXPORT_PRIVATE AddressTrackerLinux : |
| }; |
| // A function that returns the name of an interface given the interface index |
| - // in |interface_index|. |
| - typedef const char* (*GetInterfaceNameFunction)(int interface_index); |
| - |
| + // in |interface_index|. |ifname| should be a buffer of size IFNAMSIZ. The |
| + // function should return a pointer to |ifname|. |
| + typedef char* (*GetInterfaceNameFunction)(unsigned int interface_index, |
|
pauljensen
2015/01/15 15:05:10
Let's put this back to "int" as ifi_index and ifr_
derekjchow1
2015/01/15 20:32:51
Done. Also changed GetInterfaceNameFunction in net
|
| + char* ifname); |
| // Sets |*address_changed| to indicate whether |address_map_| changed and |
| // sets |*link_changed| to indicate if |online_links_| changed and sets |
| // |*tunnel_changed| to indicate if |online_links_| changed with regards to a |
| @@ -117,6 +118,9 @@ class NET_EXPORT_PRIVATE AddressTrackerLinux : |
| // Does |msg| refer to a tunnel interface? |
| bool IsTunnelInterface(const struct ifinfomsg* msg) const; |
| + // Updates current_connection_type_ based on the network list. |
| + void UpdateCurrentConnectionType(); |
| + |
| // Gets the name of an interface given the interface index |interface_index|. |
| // May return empty string if it fails but should not return NULL. This is |
| // overridden by tests. |
| @@ -136,10 +140,10 @@ class NET_EXPORT_PRIVATE AddressTrackerLinux : |
| mutable base::Lock online_links_lock_; |
| base::hash_set<int> online_links_; |
| - base::Lock is_offline_lock_; |
| - bool is_offline_; |
| - bool is_offline_initialized_; |
| - base::ConditionVariable is_offline_initialized_cv_; |
| + base::Lock connection_type_lock_; |
| + bool connection_type_initialized_; |
| + base::ConditionVariable connection_type_initialized_cv_; |
| + NetworkChangeNotifier::ConnectionType current_connection_type_; |
| bool tracking_; |
| // Used to verify single-threaded access in non-tracking mode. |