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

Unified Diff: webrtc/p2p/base/portallocator.h

Issue 1987833002: Add a flag to filter out high-cost networks. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: 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
Index: webrtc/p2p/base/portallocator.h
diff --git a/webrtc/p2p/base/portallocator.h b/webrtc/p2p/base/portallocator.h
index 879657081a5372f1248178964523c0d5ed2d1539..dcb39168f19d06465aa505ada588a4d61a3f5d81 100644
--- a/webrtc/p2p/base/portallocator.h
+++ b/webrtc/p2p/base/portallocator.h
@@ -61,6 +61,16 @@ enum {
// Disallow use of UDP when connecting to a relay server. Since proxy servers
// usually don't handle UDP, using UDP will leak the IP address.
PORTALLOCATOR_DISABLE_UDP_RELAY = 0x1000,
+
+ // When multiple networks exist, gather candidates only on the one with
+ // the lowest cost. So if both Wifi and Cellular networks exist, gather
pthatcher1 2016/05/17 20:44:28 Cellular => cellular Wifi => wifi (or Wi-Fi)
honghaiz3 2016/05/18 05:55:02 Done.
+ // only on the Wifi network. If a network type is "unknown", it has a cost
+ // lower than Cellular but higher than Wifi/Ethernet. So if an unknown network
+ // exists, Cellular networks will not be gathered on and if a Wifi network is
pthatcher1 2016/05/17 20:44:28 gathered on => gathered on it
honghaiz3 2016/05/18 05:55:02 Revised this.
+ // present, "unknown" networks will not be gathered on. Doing so ensures that
pthatcher1 2016/05/17 20:44:28 networks will not be gathered on => networks will
honghaiz3 2016/05/18 05:55:02 Done.
+ // even if a cellular network type was not detected initially, it would not be
+ // gathered on if a Wifi network is present.
+ PORTALLOCATOR_GATHER_LOW_COST_NETWORK_ONLY = 0x2000,
pthatcher1 2016/05/17 20:44:28 Following the existing naming scheme, would this b
honghaiz3 2016/05/18 05:55:02 Done.
};
const uint32_t kDefaultPortAllocatorFlags = 0;

Powered by Google App Engine
This is Rietveld 408576698