Use is_* getters when checking the Candidate type
This removes several references across the code base that depended on
the global string constants.
Bug: none
Change-Id: I007bd4b195c35261039f655f1a8f52e632c3691f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335320
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41578}
diff --git a/p2p/base/basic_ice_controller.cc b/p2p/base/basic_ice_controller.cc
index a0ff4cf..182845c 100644
--- a/p2p/base/basic_ice_controller.cc
+++ b/p2p/base/basic_ice_controller.cc
@@ -565,9 +565,9 @@
bool BasicIceController::PresumedWritable(const Connection* conn) const {
return (conn->write_state() == Connection::STATE_WRITE_INIT &&
config_.presume_writable_when_fully_relayed &&
- conn->local_candidate().type() == RELAY_PORT_TYPE &&
- (conn->remote_candidate().type() == RELAY_PORT_TYPE ||
- conn->remote_candidate().type() == PRFLX_PORT_TYPE));
+ conn->local_candidate().is_relay() &&
+ (conn->remote_candidate().is_relay() ||
+ conn->remote_candidate().is_prflx()));
}
// Compare two connections based on their writing, receiving, and connected