Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: net/base/network_change_notifier.cc

Issue 2896203003: [NetworkChangeNotifier] Return more specific network connection types (ethernet/wifi) on OSX (Closed)
Patch Set: Address issues from PS5 Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/base/network_change_notifier_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_change_notifier.cc
diff --git a/net/base/network_change_notifier.cc b/net/base/network_change_notifier.cc
index 85ca185c8ac5955e2f0a1a775d23ff65ee596bd1..7ae048995135ac221411cccba9e7088bb393d1fb 100644
--- a/net/base/network_change_notifier.cc
+++ b/net/base/network_change_notifier.cc
@@ -815,6 +815,16 @@ NetworkChangeNotifier::ConnectionTypeFromInterfaceList(
if (interfaces[i].friendly_name == "Teredo Tunneling Pseudo-Interface")
continue;
#endif
+#if defined(OS_MACOSX)
+ // Ignore tunnel and airdrop interfaces.
+ if (base::StartsWith(interfaces[i].friendly_name, "utun",
+ base::CompareCase::SENSITIVE) ||
+ base::StartsWith(interfaces[i].friendly_name, "awdl",
+ base::CompareCase::SENSITIVE)) {
+ continue;
+ }
+#endif
+
// Remove VMware network interfaces as they're internal and should not be
// used to determine the network connection type.
if (base::ToLowerASCII(interfaces[i].friendly_name).find("vmnet") !=
« no previous file with comments | « no previous file | net/base/network_change_notifier_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698