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

Unified Diff: webrtc/base/network.cc

Issue 2006893003: Set IOS Wifi interface type based on the interface name. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Add TODO Created 4 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 | webrtc/base/network_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/network.cc
diff --git a/webrtc/base/network.cc b/webrtc/base/network.cc
index 5031e967a5b4c0fc7b128369732968ea5c2bae0d..152bcdf671f38d7ac0e0a1a12b24300bab5d64fe 100644
--- a/webrtc/base/network.cc
+++ b/webrtc/base/network.cc
@@ -805,6 +805,13 @@ AdapterType BasicNetworkManager::GetAdapterTypeFromName(
if (strncmp(network_name, "pdp_ip", 6) == 0) {
return ADAPTER_TYPE_CELLULAR;
}
+ if (strncmp(network_name, "en", 2) == 0) {
+ // This may not be most accurate because sometimes Ethernet interface
+ // name also starts with "en" but it is better than showing it as
+ // "unknown" type.
+ // TODO(honghaiz): Write a proper IOS network manager.
+ return ADAPTER_TYPE_WIFI;
+ }
#elif defined(WEBRTC_ANDROID)
if (strncmp(network_name, "rmnet", 5) == 0 ||
strncmp(network_name, "v4-rmnet", 8) == 0) {
« no previous file with comments | « no previous file | webrtc/base/network_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698