| Index: net/base/address_tracker_linux.h
|
| diff --git a/net/base/address_tracker_linux.h b/net/base/address_tracker_linux.h
|
| index 415e8c89e9d8dc354d48c8a48dc24064068f71fd..b092bf2148188a68c22cbeaf31fcd3db4c15a360 100644
|
| --- a/net/base/address_tracker_linux.h
|
| +++ b/net/base/address_tracker_linux.h
|
| @@ -41,11 +41,14 @@ class NET_EXPORT_PRIVATE AddressTrackerLinux :
|
| const base::Closure& tunnel_callback);
|
| virtual ~AddressTrackerLinux();
|
|
|
| - // Starts watching system configuration for changes. The current thread must
|
| - // have a MessageLoopForIO.
|
| - void Init();
|
| + // When |track| is true, it starts watching system configuration for
|
| + // changes. The current thread must have a
|
| + // MessageLoopForIO. Otherwise, the |AddressMap| and |online_links_|
|
| + // will be a one time snapshot of current system configuration.
|
| + void Init(bool track);
|
|
|
| AddressMap GetAddressMap() const;
|
| + base::hash_set<int> GetOnlineLinks() const;
|
|
|
| // Implementation of NetworkChangeNotifierLinux::GetCurrentConnectionType().
|
| // Safe to call from any thread, but will block until Init() has completed.
|
| @@ -105,6 +108,7 @@ class NET_EXPORT_PRIVATE AddressTrackerLinux :
|
| AddressMap address_map_;
|
|
|
| // Set of interface indices for links that are currently online.
|
| + mutable base::Lock online_links_lock_;
|
| base::hash_set<int> online_links_;
|
|
|
| base::Lock is_offline_lock_;
|
|
|