WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 1
This cl/
1) move WebRtcKeyValueConfig from api/transport to api/ directory.
2) add a test/ScopedKeyValueConfig (compare ScopedFieldTrials).
3) removes usage of webrtc::field_trial:: from the pc/ directory.
4) removes a few unused includes of system_wrappers/field_trial.h.
Bug: webrtc:10335
Change-Id: If29c07900dbe791050b0a5ad05332bedfad035f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253903
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36160}
diff --git a/pc/jsep_transport_controller.cc b/pc/jsep_transport_controller.cc
index e63742a..6c69130 100644
--- a/pc/jsep_transport_controller.cc
+++ b/pc/jsep_transport_controller.cc
@@ -62,6 +62,7 @@
RTC_DCHECK(config_.rtcp_handler);
RTC_DCHECK(config_.ice_transport_factory);
RTC_DCHECK(config_.on_dtls_handshake_error_);
+ RTC_DCHECK(config_.field_trials);
}
JsepTransportController::~JsepTransportController() {
@@ -477,8 +478,8 @@
cricket::DtlsTransportInternal* rtp_dtls_transport,
cricket::DtlsTransportInternal* rtcp_dtls_transport) {
RTC_DCHECK_RUN_ON(network_thread_);
- auto srtp_transport =
- std::make_unique<webrtc::SrtpTransport>(rtcp_dtls_transport == nullptr);
+ auto srtp_transport = std::make_unique<webrtc::SrtpTransport>(
+ rtcp_dtls_transport == nullptr, *config_.field_trials);
RTC_DCHECK(rtp_dtls_transport);
srtp_transport->SetRtpPacketTransport(rtp_dtls_transport);
if (rtcp_dtls_transport) {
@@ -497,7 +498,7 @@
cricket::DtlsTransportInternal* rtcp_dtls_transport) {
RTC_DCHECK_RUN_ON(network_thread_);
auto dtls_srtp_transport = std::make_unique<webrtc::DtlsSrtpTransport>(
- rtcp_dtls_transport == nullptr);
+ rtcp_dtls_transport == nullptr, *config_.field_trials);
if (config_.enable_external_auth) {
dtls_srtp_transport->EnableExternalAuth();
}