Remove one use of sigslot from webrtc_session_description_factory

This instance turned out to only be used for a single constant, known at
creation time callback function, so a function was more appropriate.

Bug: none
Change-Id: If131f75ed82607af50c4d85f1e80a693170ff687
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/192362
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32569}
This commit is contained in:
Harald Alvestrand
2020-11-09 14:15:00 +00:00
committed by Commit Bot
parent 9da3e177fd
commit a094787cb7
4 changed files with 17 additions and 20 deletions

View File

@ -994,9 +994,10 @@ void SdpOfferAnswerHandler::Initialize(
std::make_unique<WebRtcSessionDescriptionFactory>(
signaling_thread(), channel_manager(), this, pc_->session_id(),
pc_->dtls_enabled(), std::move(dependencies.cert_generator),
certificate, &ssrc_generator_);
webrtc_session_desc_factory_->SignalCertificateReady.connect(
this, &SdpOfferAnswerHandler::OnCertificateReady);
certificate, &ssrc_generator_,
[this](const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) {
transport_controller()->SetLocalCertificate(certificate);
});
if (pc_->options()->disable_encryption) {
webrtc_session_desc_factory_->SetSdesPolicy(cricket::SEC_DISABLED);
@ -1061,11 +1062,6 @@ const RtpTransmissionManager* SdpOfferAnswerHandler::rtp_manager() const {
// ===================================================================
void SdpOfferAnswerHandler::OnCertificateReady(
const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) {
transport_controller()->SetLocalCertificate(certificate);
}
void SdpOfferAnswerHandler::PrepareForShutdown() {
RTC_DCHECK_RUN_ON(signaling_thread());
weak_ptr_factory_.InvalidateWeakPtrs();