Make disable_ipv6 ABSL_DEPRECATED.

// All tests pass, infra failure unrelated
NOTRY=True

Bug: webrtc:14608
Change-Id: Ie16dcf9dc66e687f0befef42c7d8e914696af191
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280760
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38502}
This commit is contained in:
Henrik Boström
2022-10-27 13:49:10 +02:00
committed by WebRTC LUCI CQ
parent 5029efb615
commit 24e0337846
3 changed files with 10 additions and 6 deletions

View File

@ -428,7 +428,10 @@ class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface {
// If set to true, don't gather IPv6 ICE candidates.
// TODO(https://crbug.com/webrtc/14608): Delete this flag.
bool disable_ipv6 = false;
union {
bool DEPRECATED_disable_ipv6 = false;
bool ABSL_DEPRECATED("https://crbug.com/webrtc/14608") disable_ipv6;
};
// If set to true, don't gather IPv6 ICE candidates on Wi-Fi.
// Only intended to be used on specific devices. Certain phones disable IPv6

View File

@ -297,7 +297,7 @@ bool PeerConnectionInterface::RTCConfiguration::operator==(
RtcpMuxPolicy rtcp_mux_policy;
std::vector<rtc::scoped_refptr<rtc::RTCCertificate>> certificates;
int ice_candidate_pool_size;
bool disable_ipv6;
bool DEPRECATED_disable_ipv6;
bool disable_ipv6_on_wifi;
int max_ipv6_networks;
bool disable_link_local_networks;
@ -365,7 +365,8 @@ bool PeerConnectionInterface::RTCConfiguration::operator==(
certificates == o.certificates &&
prioritize_most_likely_ice_candidate_pairs ==
o.prioritize_most_likely_ice_candidate_pairs &&
media_config == o.media_config && disable_ipv6 == o.disable_ipv6 &&
media_config == o.media_config &&
DEPRECATED_disable_ipv6 == o.DEPRECATED_disable_ipv6 &&
disable_ipv6_on_wifi == o.disable_ipv6_on_wifi &&
max_ipv6_networks == o.max_ipv6_networks &&
disable_link_local_networks == o.disable_link_local_networks &&
@ -2094,7 +2095,7 @@ PeerConnection::InitializePortAllocator_n(
cricket::PORTALLOCATOR_ENABLE_IPV6_ON_WIFI;
// If the disable-IPv6 flag was specified, we'll not override it
// by experiment.
if (configuration.disable_ipv6) {
if (configuration.DEPRECATED_disable_ipv6) {
port_allocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6);
} else if (trials().IsDisabled("WebRTC-IPv6Default")) {
port_allocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6);

View File

@ -1332,7 +1332,7 @@ TEST_P(PeerConnectionInterfaceTest, CreatePeerConnectionWithPooledCandidates) {
server.uri = kStunAddressOnly;
config.servers.push_back(server);
config.type = PeerConnectionInterface::kRelay;
config.disable_ipv6 = true;
config.DEPRECATED_disable_ipv6 = true;
config.tcp_candidate_policy =
PeerConnectionInterface::kTcpCandidatePolicyDisabled;
config.candidate_network_policy =
@ -3827,7 +3827,7 @@ TEST(RTCConfigurationTest, ComparisonOperators) {
EXPECT_NE(a, f);
PeerConnectionInterface::RTCConfiguration g;
g.disable_ipv6 = true;
g.DEPRECATED_disable_ipv6 = true;
EXPECT_NE(a, g);
PeerConnectionInterface::RTCConfiguration h(