| Index: net/base/network_change_notifier.h
|
| diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h
|
| index 6b801bc7c424ead6326bde9bd2441bfeca4e30f9..98ade3ea1d179dd1138dce17db64e25a7b44ea2e 100644
|
| --- a/net/base/network_change_notifier.h
|
| +++ b/net/base/network_change_notifier.h
|
| @@ -5,7 +5,10 @@
|
| #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
|
| #define NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
|
|
|
| +#include <vector>
|
| +
|
| #include "base/basictypes.h"
|
| +#include "base/gtest_prod_util.h"
|
| #include "base/observer_list_threadsafe.h"
|
| #include "base/time/time.h"
|
| #include "net/base/net_export.h"
|
| @@ -17,6 +20,8 @@ namespace net {
|
| struct DnsConfig;
|
| class HistogramWatcher;
|
| class NetworkChangeNotifierFactory;
|
| +struct NetworkInterface;
|
| +typedef std::vector<NetworkInterface> NetworkInterfaceList;
|
| class URLRequest;
|
|
|
| #if defined(OS_LINUX)
|
| @@ -300,15 +305,26 @@ class NET_EXPORT NetworkChangeNotifier {
|
| // Stores |config| in NetworkState and notifies observers.
|
| static void SetDnsConfig(const DnsConfig& config);
|
|
|
| + // Infer connection type from |GetNetworkList|. If all network interfaces have
|
| + // the same type, return it, otherwise return CONNECTION_UNKNOWN.
|
| + static ConnectionType ConnectionTypeFromInterfaces();
|
| +
|
| private:
|
| friend class HostResolverImplDnsTest;
|
| friend class NetworkChangeNotifierAndroidTest;
|
| friend class NetworkChangeNotifierLinuxTest;
|
| friend class NetworkChangeNotifierWinTest;
|
| + FRIEND_TEST_ALL_PREFIXES(NetworkChangeNotifierTest,
|
| + InterfacesToConnectionType);
|
|
|
| class NetworkState;
|
| class NetworkChangeCalculator;
|
|
|
| + // Infer connection type from |interfaces|. If all network interfaces have
|
| + // the same type, return it, otherwise return CONNECTION_UNKNOWN.
|
| + static ConnectionType ConnectionTypeFromInterfaceList(
|
| + const NetworkInterfaceList& interfaces);
|
| +
|
| const scoped_refptr<ObserverListThreadSafe<IPAddressObserver> >
|
| ip_address_observer_list_;
|
| const scoped_refptr<ObserverListThreadSafe<ConnectionTypeObserver> >
|
|
|