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

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

Issue 2568833002: Refactor "secure bool" into explicit PROTO_TLS. (Closed)
Patch Set: GetRelayPreference(): Add RTC_DCHECK(proto == PROTO_UDP). Created 4 years 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 | « webrtc/p2p/base/p2ptransportchannel_unittest.cc ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/port.h
diff --git a/webrtc/p2p/base/port.h b/webrtc/p2p/base/port.h
index c7e783721b6d8200fb989b54a49818b37256fc3d..e1a702039df1d36a1cf5aad77ca9b2f49eb37171 100644
--- a/webrtc/p2p/base/port.h
+++ b/webrtc/p2p/base/port.h
@@ -81,14 +81,9 @@ enum RelayType {
};
enum IcePriorityValue {
- // The reason we are choosing Relay preference 2 is because, we can run
- // Relay from client to server on UDP/TCP/TLS. To distinguish the transport
- // protocol, we prefer UDP over TCP over TLS.
- // For UDP ICE_TYPE_PREFERENCE_RELAY will be 2.
- // For TCP ICE_TYPE_PREFERENCE_RELAY will be 1.
- // For TLS ICE_TYPE_PREFERENCE_RELAY will be 0.
- // Check turnport.cc for setting these values.
- ICE_TYPE_PREFERENCE_RELAY = 2,
+ ICE_TYPE_PREFERENCE_RELAY_TLS = 0,
+ ICE_TYPE_PREFERENCE_RELAY_TCP = 1,
+ ICE_TYPE_PREFERENCE_RELAY_UDP = 2,
ICE_TYPE_PREFERENCE_PRFLX_TCP = 80,
ICE_TYPE_PREFERENCE_HOST_TCP = 90,
ICE_TYPE_PREFERENCE_SRFLX = 100,
@@ -102,15 +97,12 @@ bool StringToProto(const char* value, ProtocolType* proto);
struct ProtocolAddress {
rtc::SocketAddress address;
ProtocolType proto;
- bool secure;
ProtocolAddress(const rtc::SocketAddress& a, ProtocolType p)
- : address(a), proto(p), secure(false) { }
- ProtocolAddress(const rtc::SocketAddress& a, ProtocolType p, bool sec)
- : address(a), proto(p), secure(sec) { }
+ : address(a), proto(p) {}
bool operator==(const ProtocolAddress& o) const {
- return address == o.address && proto == o.proto && secure == o.secure;
+ return address == o.address && proto == o.proto;
}
bool operator!=(const ProtocolAddress& o) const { return !(*this == o); }
};
« no previous file with comments | « webrtc/p2p/base/p2ptransportchannel_unittest.cc ('k') | webrtc/p2p/base/port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698