Skip to content

Commit

Permalink
Delete deprecated disable_ipv6 flag.
Browse files Browse the repository at this point in the history
M108 Stable has been released, which does not contain googIPv6 anymore,
and today the last downstream dependency on this flag was removed.

Let's delete!

Bug: webrtc:14608
Change-Id: Ia2d201f0da04b14961f891687b6135fc69b7767e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285720
Auto-Submit: Henrik Boström <[email protected]>
Reviewed-by: Harald Alvestrand <[email protected]>
Commit-Queue: Henrik Boström <[email protected]>
Cr-Commit-Position: refs/heads/main@{#38786}
  • Loading branch information
henbos authored and WebRTC LUCI CQ committed Dec 1, 2022
1 parent f889217 commit a445e6a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
7 changes: 0 additions & 7 deletions api/peer_connection_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,13 +426,6 @@ class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface {
// default will be used.
//////////////////////////////////////////////////////////////////////////

// If set to true, don't gather IPv6 ICE candidates.
// TODO(https://crbug.com/webrtc/14608): Delete this flag.
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
// when the screen is turned off and it would be better to just disable the
Expand Down
8 changes: 1 addition & 7 deletions pc/peer_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ bool PeerConnectionInterface::RTCConfiguration::operator==(
RtcpMuxPolicy rtcp_mux_policy;
std::vector<rtc::scoped_refptr<rtc::RTCCertificate>> certificates;
int ice_candidate_pool_size;
bool DEPRECATED_disable_ipv6;
bool disable_ipv6_on_wifi;
int max_ipv6_networks;
bool disable_link_local_networks;
Expand Down Expand Up @@ -367,7 +366,6 @@ bool PeerConnectionInterface::RTCConfiguration::operator==(
prioritize_most_likely_ice_candidate_pairs ==
o.prioritize_most_likely_ice_candidate_pairs &&
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 &&
Expand Down Expand Up @@ -2116,11 +2114,7 @@ PeerConnection::InitializePortAllocator_n(
port_allocator_flags |= cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET |
cricket::PORTALLOCATOR_ENABLE_IPV6 |
cricket::PORTALLOCATOR_ENABLE_IPV6_ON_WIFI;
// If the disable-IPv6 flag was specified, we'll not override it
// by experiment.
if (configuration.DEPRECATED_disable_ipv6) {
port_allocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6);
} else if (trials().IsDisabled("WebRTC-IPv6Default")) {
if (trials().IsDisabled("WebRTC-IPv6Default")) {
port_allocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6);
}
if (configuration.disable_ipv6_on_wifi) {
Expand Down
6 changes: 0 additions & 6 deletions pc/peer_connection_interface_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,6 @@ TEST_P(PeerConnectionInterfaceTest, CreatePeerConnectionWithPooledCandidates) {
server.uri = kStunAddressOnly;
config.servers.push_back(server);
config.type = PeerConnectionInterface::kRelay;
config.DEPRECATED_disable_ipv6 = true;
config.tcp_candidate_policy =
PeerConnectionInterface::kTcpCandidatePolicyDisabled;
config.candidate_network_policy =
Expand All @@ -1347,7 +1346,6 @@ TEST_P(PeerConnectionInterfaceTest, CreatePeerConnectionWithPooledCandidates) {
port_allocator_->GetPooledSession());
ASSERT_NE(nullptr, session);
EXPECT_EQ(1UL, session->stun_servers().size());
EXPECT_EQ(0U, session->flags() & cricket::PORTALLOCATOR_ENABLE_IPV6);
EXPECT_LT(0U, session->flags() & cricket::PORTALLOCATOR_DISABLE_TCP);
EXPECT_LT(0U,
session->flags() & cricket::PORTALLOCATOR_DISABLE_COSTLY_NETWORKS);
Expand Down Expand Up @@ -3828,10 +3826,6 @@ TEST(RTCConfigurationTest, ComparisonOperators) {
f.ice_connection_receiving_timeout = 1337;
EXPECT_NE(a, f);

PeerConnectionInterface::RTCConfiguration g;
g.DEPRECATED_disable_ipv6 = true;
EXPECT_NE(a, g);

PeerConnectionInterface::RTCConfiguration h(
PeerConnectionInterface::RTCConfigurationType::kAggressive);
EXPECT_NE(a, h);
Expand Down

0 comments on commit a445e6a

Please sign in to comment.