Commit 27355dba authored by Henrik Boström's avatar Henrik Boström Committed by Chromium LUCI CQ

[WebRTC] Add deprecation warning when Plan B is used.

Intent to Deprecate on blink-dev:
https://groups.google.com/u/3/a/chromium.org/g/blink-dev/c/IY2amIigFFs

Plan B SDP is still heavily used two years after Unified Plan
shipped-by-default. This can cause compatibility issues with Firefox and
Safari unless the application does sophisticated SDP translation.

This deprecation warning is meant to discourage Plan B and encourage
migration to the standardized SDP format Unified Plan, allowing us to
remove Plan B when usage is sufficiently low.

In the blink-dev discussion we talk about adding adding a Reverse Origin
Trial at a future date in case large services still depend on Plan B
when M93 comes around.

Bug: chromium:857004
Change-Id: Ic95964278a5b7c693cfc7868e957517a64a4ac01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2595744
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Reviewed-by: default avatarNate Chapin <japhet@chromium.org>
Reviewed-by: default avatarHarald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843771}
parent 6cae032c
......@@ -3091,6 +3091,7 @@ enum WebFeature {
kAddressSpaceUnknownNonSecureContextNavigatedToLocal = 3770,
kAddressSpaceUnknownSecureContextNavigatedToPrivate = 3771,
kAddressSpaceUnknownNonSecureContextNavigatedToPrivate = 3772,
kRTCPeerConnectionSdpSemanticsPlanB = 3773,
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.
......
......@@ -70,6 +70,8 @@ enum Milestone {
kM89 = 89,
kM90 = 90,
kM91 = 91,
kM92 = 92,
kM93 = 93,
};
// Returns estimated milestone dates as milliseconds since January 1, 1970.
......@@ -130,6 +132,10 @@ base::Time::Exploded MilestoneDate(Milestone milestone) {
return {2021, 4, 0, 13, 4};
case kM91:
return {2021, 5, 0, 25, 4};
case kM92:
return {2021, 7, 0, 20, 4};
case kM93:
return {2021, 8, 0, 31, 4};
}
NOTREACHED();
......@@ -555,6 +561,16 @@ DeprecationInfo GetDeprecationInfo(WebFeature feature) {
" See https://chromestatus.com/feature/6730096436051968 for "
"more details."};
case WebFeature::kRTCPeerConnectionSdpSemanticsPlanB:
return {"RTCPeerConnectionSdpSemanticsPlanB", kM93,
"Plan B SDP semantics, which is used when constructing an "
"RTCPeerConnection with {sdpSemantics:\"plan-b\"}, is a legacy "
"version of the Session Description Protocol that has severe "
"compatibility issues on modern browsers. The standardized SDP "
"format, \"unified-plan\", has been used by default since M72 "
"(January, 2019). Dropping support for Plan B is targeted for "
"M93 (Canary: July 15, 2021; Stable: August 24, 2021)."};
// Features that aren't deprecated don't have a deprecation message.
default:
return {"NotDeprecated", kUnknown, ""};
......
......@@ -324,6 +324,8 @@ webrtc::PeerConnectionInterface::RTCConfiguration ParseConfiguration(
if (configuration->hasSdpSemantics()) {
if (configuration->sdpSemantics() == "plan-b") {
web_configuration.sdp_semantics = webrtc::SdpSemantics::kPlanB;
Deprecation::CountDeprecation(
context, WebFeature::kRTCPeerConnectionSdpSemanticsPlanB);
} else {
DCHECK_EQ(configuration->sdpSemantics(), "unified-plan");
web_configuration.sdp_semantics = webrtc::SdpSemantics::kUnifiedPlan;
......
......@@ -30967,6 +30967,7 @@ Called by update_use_counter_feature_enum.py.-->
<int value="3771" label="AddressSpaceUnknownSecureContextNavigatedToPrivate"/>
<int value="3772"
label="AddressSpaceUnknownNonSecureContextNavigatedToPrivate"/>
<int value="3773" label="RTCPeerConnectionSdpSemanticsPlanB"/>
</enum>
<enum name="FeaturePolicyAllowlistType">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment