[NetworkChangeNotifier] Get connection type from interface list for Windows
On Windows, use the NetworkInterfaceList to determine the connection type
instead of returning UNKNOWN.
This is essentially a reland of https://codereview.chromium.org/739983005
which was reverted because it was slow on XP, but now XP is no longer
supported. The intent is to land this patch and monitor the canary dashboards
to see if startup time increases.
BUG=160537
Review-Url: https://codereview.chromium.org/2872433004
Cr-Commit-Position: refs/heads/master@{#470400}
diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h
index a758cc3a..6678979 100644
--- a/net/base/network_change_notifier.h
+++ b/net/base/network_change_notifier.h
@@ -538,6 +538,10 @@
// observers.
static void SetInitialDnsConfig(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;