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..589b89a5623ba1e45a4fd891368ba8d3835f8711 100644 |
--- a/net/base/address_tracker_linux.h |
+++ b/net/base/address_tracker_linux.h |
@@ -84,8 +84,8 @@ class NET_EXPORT_PRIVATE AddressTrackerLinux : |
// A function that returns the name of an interface given the interface index |
// in |interface_index|. |
pauljensen
2015/01/13 13:14:29
Please explain |ifname| argument. e.g. what size s
derekjchow1
2015/01/13 21:32:35
Done.
|
- typedef const char* (*GetInterfaceNameFunction)(int interface_index); |
- |
+ typedef char* (*GetInterfaceNameFunction)(unsigned int interface_index, |
+ 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 +117,10 @@ class NET_EXPORT_PRIVATE AddressTrackerLinux : |
// Does |msg| refer to a tunnel interface? |
bool IsTunnelInterface(const struct ifinfomsg* msg) const; |
+ // Gets the current connection type from online_links_. Returns |
+ // CONNECTION_UNKNOWN if two interfaces have different connection types. |
+ NetworkChangeNotifier::ConnectionType GetNewConnectionType(); |
pauljensen
2015/01/13 13:14:30
I think "New" in the name is confusing, can we rep
derekjchow1
2015/01/13 21:32:35
I changed the function to UpdateCurrentConnectionT
|
+ |
// 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 is_initialized_; |
pauljensen
2015/01/13 13:14:30
Can you rename this to be more precise? i.e. is_c
derekjchow1
2015/01/13 21:32:35
Done.
|
+ base::ConditionVariable is_initialized_cv_; |
pauljensen
2015/01/13 13:14:29
Ditto.
derekjchow1
2015/01/13 21:32:35
Done.
|
+ NetworkChangeNotifier::ConnectionType current_connection_type_; |
bool tracking_; |
// Used to verify single-threaded access in non-tracking mode. |