Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.
This CL has been created with the following steps:
git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt
diff --new-line-format="" --unchanged-line-format="" \
/tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
/tmp/only_make_unique.txt /tmp/memory.txt | \
xargs grep -l "absl/memory" > /tmp/add-memory.txt
git grep -l "\babsl::make_unique\b" | \
xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"
git checkout PRESUBMIT.py abseil-in-webrtc.md
cat /tmp/add-memory.txt | \
xargs sed -i \
's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>
cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
xargs sed -i '/#include "absl\/memory\/memory.h"/d'
git ls-files | grep BUILD.gn | \
xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'
python tools_webrtc/gn_check_autofix.py \
-m tryserver.webrtc -b linux_rel
# Repead the gn_check_autofix step for other platforms
git ls-files | grep BUILD.gn | \
xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format
Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
diff --git a/pc/BUILD.gn b/pc/BUILD.gn
index 4434139..fb9bf27 100644
--- a/pc/BUILD.gn
+++ b/pc/BUILD.gn
@@ -260,7 +260,6 @@
"../system_wrappers:field_trial",
"../system_wrappers:metrics",
"//third_party/abseil-cpp/absl/algorithm:container",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
@@ -387,7 +386,6 @@
"../system_wrappers",
"../test:perf_test",
"../test:test_support",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
}
@@ -482,7 +480,6 @@
"../rtc_base/third_party/sigslot",
"../test:test_support",
"../test:video_test_common",
- "//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
}
diff --git a/pc/channel_manager.cc b/pc/channel_manager.cc
index 0023a2f..ce8f473 100644
--- a/pc/channel_manager.cc
+++ b/pc/channel_manager.cc
@@ -187,7 +187,7 @@
return nullptr;
}
- auto voice_channel = absl::make_unique<VoiceChannel>(
+ auto voice_channel = std::make_unique<VoiceChannel>(
worker_thread_, network_thread_, signaling_thread,
absl::WrapUnique(media_channel), content_name, srtp_required,
crypto_options, ssrc_generator);
@@ -259,7 +259,7 @@
return nullptr;
}
- auto video_channel = absl::make_unique<VideoChannel>(
+ auto video_channel = std::make_unique<VideoChannel>(
worker_thread_, network_thread_, signaling_thread,
absl::WrapUnique(media_channel), content_name, srtp_required,
crypto_options, ssrc_generator);
@@ -320,7 +320,7 @@
return nullptr;
}
- auto data_channel = absl::make_unique<RtpDataChannel>(
+ auto data_channel = std::make_unique<RtpDataChannel>(
worker_thread_, network_thread_, signaling_thread,
absl::WrapUnique(media_channel), content_name, srtp_required,
crypto_options, ssrc_generator);
diff --git a/pc/channel_manager_unittest.cc b/pc/channel_manager_unittest.cc
index e88b09c..ab3b88b 100644
--- a/pc/channel_manager_unittest.cc
+++ b/pc/channel_manager_unittest.cc
@@ -12,7 +12,6 @@
#include <memory>
-#include "absl/memory/memory.h"
#include "api/rtc_error.h"
#include "api/test/fake_media_transport.h"
#include "api/transport/media/media_transport_config.h"
@@ -66,9 +65,9 @@
}
std::unique_ptr<webrtc::RtpTransportInternal> CreateDtlsSrtpTransport() {
- rtp_dtls_transport_ = absl::make_unique<FakeDtlsTransport>(
+ rtp_dtls_transport_ = std::make_unique<FakeDtlsTransport>(
"fake_dtls_transport", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto dtls_srtp_transport = absl::make_unique<webrtc::DtlsSrtpTransport>(
+ auto dtls_srtp_transport = std::make_unique<webrtc::DtlsSrtpTransport>(
/*rtcp_mux_required=*/true);
dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport_.get(),
/*rtcp_dtls_transport=*/nullptr);
diff --git a/pc/channel_unittest.cc b/pc/channel_unittest.cc
index 5b388ea..efc1d59 100644
--- a/pc/channel_unittest.cc
+++ b/pc/channel_unittest.cc
@@ -14,7 +14,6 @@
#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "api/array_view.h"
#include "api/audio_options.h"
#include "api/rtp_parameters.h"
@@ -132,9 +131,9 @@
}
void CreateChannels(int flags1, int flags2) {
- CreateChannels(absl::make_unique<typename T::MediaChannel>(
+ CreateChannels(std::make_unique<typename T::MediaChannel>(
nullptr, typename T::Options()),
- absl::make_unique<typename T::MediaChannel>(
+ std::make_unique<typename T::MediaChannel>(
nullptr, typename T::Options()),
flags1, flags2);
}
@@ -262,7 +261,7 @@
webrtc::RtpTransportInternal* rtp_transport,
int flags) {
rtc::Thread* signaling_thread = rtc::Thread::Current();
- auto channel = absl::make_unique<typename T::Channel>(
+ auto channel = std::make_unique<typename T::Channel>(
worker_thread, network_thread, signaling_thread, std::move(ch),
cricket::CN_AUDIO, (flags & DTLS) != 0, webrtc::CryptoOptions(),
&ssrc_generator_);
@@ -297,7 +296,7 @@
std::unique_ptr<webrtc::RtpTransport> CreateUnencryptedTransport(
rtc::PacketTransportInternal* rtp_packet_transport,
rtc::PacketTransportInternal* rtcp_packet_transport) {
- auto rtp_transport = absl::make_unique<webrtc::RtpTransport>(
+ auto rtp_transport = std::make_unique<webrtc::RtpTransport>(
rtcp_packet_transport == nullptr);
rtp_transport->SetRtpPacketTransport(rtp_packet_transport);
@@ -310,7 +309,7 @@
std::unique_ptr<webrtc::DtlsSrtpTransport> CreateDtlsSrtpTransport(
cricket::DtlsTransportInternal* rtp_dtls_transport,
cricket::DtlsTransportInternal* rtcp_dtls_transport) {
- auto dtls_srtp_transport = absl::make_unique<webrtc::DtlsSrtpTransport>(
+ auto dtls_srtp_transport = std::make_unique<webrtc::DtlsSrtpTransport>(
rtcp_dtls_transport == nullptr);
dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport,
@@ -959,8 +958,8 @@
T::MediaChannel::SendRtcp(kRtcpReport, sizeof(kRtcpReport));
}
};
- CreateChannels(absl::make_unique<LastWordMediaChannel>(),
- absl::make_unique<LastWordMediaChannel>(), RTCP_MUX,
+ CreateChannels(std::make_unique<LastWordMediaChannel>(),
+ std::make_unique<LastWordMediaChannel>(), RTCP_MUX,
RTCP_MUX);
EXPECT_TRUE(SendInitiate());
EXPECT_TRUE(SendAccept());
@@ -1621,7 +1620,7 @@
webrtc::RtpTransportInternal* rtp_transport,
int flags) {
rtc::Thread* signaling_thread = rtc::Thread::Current();
- auto channel = absl::make_unique<cricket::VideoChannel>(
+ auto channel = std::make_unique<cricket::VideoChannel>(
worker_thread, network_thread, signaling_thread, std::move(ch),
cricket::CN_VIDEO, (flags & DTLS) != 0, webrtc::CryptoOptions(),
&ssrc_generator_);
@@ -2440,7 +2439,7 @@
webrtc::RtpTransportInternal* rtp_transport,
int flags) {
rtc::Thread* signaling_thread = rtc::Thread::Current();
- auto channel = absl::make_unique<cricket::RtpDataChannel>(
+ auto channel = std::make_unique<cricket::RtpDataChannel>(
worker_thread, network_thread, signaling_thread, std::move(ch),
cricket::CN_DATA, (flags & DTLS) != 0, webrtc::CryptoOptions(),
&ssrc_generator_);
diff --git a/pc/composite_rtp_transport_test.cc b/pc/composite_rtp_transport_test.cc
index 77512d9..0248084 100644
--- a/pc/composite_rtp_transport_test.cc
+++ b/pc/composite_rtp_transport_test.cc
@@ -12,7 +12,6 @@
#include <memory>
-#include "absl/memory/memory.h"
#include "modules/rtp_rtcp/source/rtp_packet_received.h"
#include "p2p/base/fake_packet_transport.h"
#include "pc/rtp_transport.h"
@@ -34,17 +33,17 @@
public:
CompositeRtpTransportTest()
: packet_transport_1_(
- absl::make_unique<rtc::FakePacketTransport>(kTransportName)),
+ std::make_unique<rtc::FakePacketTransport>(kTransportName)),
packet_transport_2_(
- absl::make_unique<rtc::FakePacketTransport>(kTransportName)),
+ std::make_unique<rtc::FakePacketTransport>(kTransportName)),
rtcp_transport_1_(
- absl::make_unique<rtc::FakePacketTransport>(kRtcpTransportName)),
+ std::make_unique<rtc::FakePacketTransport>(kRtcpTransportName)),
rtcp_transport_2_(
- absl::make_unique<rtc::FakePacketTransport>(kRtcpTransportName)) {}
+ std::make_unique<rtc::FakePacketTransport>(kRtcpTransportName)) {}
void SetupRtpTransports(bool rtcp_mux) {
- transport_1_ = absl::make_unique<RtpTransport>(rtcp_mux);
- transport_2_ = absl::make_unique<RtpTransport>(rtcp_mux);
+ transport_1_ = std::make_unique<RtpTransport>(rtcp_mux);
+ transport_2_ = std::make_unique<RtpTransport>(rtcp_mux);
transport_1_->SetRtpPacketTransport(packet_transport_1_.get());
transport_2_->SetRtpPacketTransport(packet_transport_2_.get());
@@ -53,7 +52,7 @@
transport_2_->SetRtcpPacketTransport(rtcp_transport_2_.get());
}
- composite_ = absl::make_unique<CompositeRtpTransport>(
+ composite_ = std::make_unique<CompositeRtpTransport>(
std::vector<RtpTransportInternal*>{transport_1_.get(),
transport_2_.get()});
diff --git a/pc/data_channel.cc b/pc/data_channel.cc
index 586520b..c5a8aeb 100644
--- a/pc/data_channel.cc
+++ b/pc/data_channel.cc
@@ -14,7 +14,6 @@
#include <string>
#include <utility>
-#include "absl/memory/memory.h"
#include "media/sctp/sctp_transport_internal.h"
#include "pc/sctp_utils.h"
#include "rtc_base/checks.h"
@@ -426,7 +425,7 @@
}
bool binary = (params.type == cricket::DMT_BINARY);
- auto buffer = absl::make_unique<DataBuffer>(payload, binary);
+ auto buffer = std::make_unique<DataBuffer>(payload, binary);
if (state_ == kOpen && observer_) {
++messages_received_;
bytes_received_ += buffer->size();
@@ -663,7 +662,7 @@
RTC_LOG(LS_ERROR) << "Can't buffer any more data for the data channel.";
return false;
}
- queued_send_data_.PushBack(absl::make_unique<DataBuffer>(buffer));
+ queued_send_data_.PushBack(std::make_unique<DataBuffer>(buffer));
return true;
}
@@ -678,7 +677,7 @@
}
void DataChannel::QueueControlMessage(const rtc::CopyOnWriteBuffer& buffer) {
- queued_control_data_.PushBack(absl::make_unique<DataBuffer>(buffer, true));
+ queued_control_data_.PushBack(std::make_unique<DataBuffer>(buffer, true));
}
bool DataChannel::SendControlMessage(const rtc::CopyOnWriteBuffer& buffer) {
diff --git a/pc/dtls_srtp_transport_unittest.cc b/pc/dtls_srtp_transport_unittest.cc
index 38d0458..770c140 100644
--- a/pc/dtls_srtp_transport_unittest.cc
+++ b/pc/dtls_srtp_transport_unittest.cc
@@ -16,7 +16,6 @@
#include <memory>
#include <set>
-#include "absl/memory/memory.h"
#include "call/rtp_demuxer.h"
#include "media/base/fake_rtp.h"
#include "p2p/base/dtls_transport_internal.h"
@@ -59,7 +58,7 @@
FakeDtlsTransport* rtcp_dtls,
bool rtcp_mux_enabled) {
auto dtls_srtp_transport =
- absl::make_unique<DtlsSrtpTransport>(rtcp_mux_enabled);
+ std::make_unique<DtlsSrtpTransport>(rtcp_mux_enabled);
dtls_srtp_transport->SetDtlsTransports(rtp_dtls, rtcp_dtls);
@@ -261,17 +260,17 @@
// Tests that if RTCP muxing is enabled and transports are set after RTP
// transport finished the handshake, SRTP is set up.
TEST_F(DtlsSrtpTransportTest, SetTransportsAfterHandshakeCompleteWithRtcpMux) {
- auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls1 = std::make_unique<FakeDtlsTransport>(
"video", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls2 = std::make_unique<FakeDtlsTransport>(
"video", cricket::ICE_CANDIDATE_COMPONENT_RTP);
MakeDtlsSrtpTransports(rtp_dtls1.get(), nullptr, rtp_dtls2.get(), nullptr,
/*rtcp_mux_enabled=*/true);
- auto rtp_dtls3 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls3 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtp_dtls4 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls4 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
CompleteDtlsHandshake(rtp_dtls3.get(), rtp_dtls4.get());
@@ -286,25 +285,25 @@
// RTP and RTCP transports finished the handshake, SRTP is set up.
TEST_F(DtlsSrtpTransportTest,
SetTransportsAfterHandshakeCompleteWithoutRtcpMux) {
- auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls1 = std::make_unique<FakeDtlsTransport>(
"video", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls1 = std::make_unique<FakeDtlsTransport>(
"video", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
- auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls2 = std::make_unique<FakeDtlsTransport>(
"video", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls2 = std::make_unique<FakeDtlsTransport>(
"video", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
rtcp_dtls2.get(), /*rtcp_mux_enabled=*/false);
- auto rtp_dtls3 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls3 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls3 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls3 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
- auto rtp_dtls4 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls4 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls4 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls4 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
CompleteDtlsHandshake(rtp_dtls3.get(), rtp_dtls4.get());
CompleteDtlsHandshake(rtcp_dtls3.get(), rtcp_dtls4.get());
@@ -318,13 +317,13 @@
// Tests if RTCP muxing is enabled, SRTP is set up as soon as the RTP DTLS
// handshake is finished.
TEST_F(DtlsSrtpTransportTest, SetTransportsBeforeHandshakeCompleteWithRtcpMux) {
- auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
- auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
@@ -341,13 +340,13 @@
// RTCP DTLS handshake are finished.
TEST_F(DtlsSrtpTransportTest,
SetTransportsBeforeHandshakeCompleteWithoutRtcpMux) {
- auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
- auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
@@ -364,9 +363,9 @@
// context will be reset and will be re-setup once the new transports' handshake
// complete.
TEST_F(DtlsSrtpTransportTest, DtlsSrtpResetAfterDtlsTransportChange) {
- auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
MakeDtlsSrtpTransports(rtp_dtls1.get(), nullptr, rtp_dtls2.get(), nullptr,
@@ -376,9 +375,9 @@
EXPECT_TRUE(dtls_srtp_transport1_->IsSrtpActive());
EXPECT_TRUE(dtls_srtp_transport2_->IsSrtpActive());
- auto rtp_dtls3 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls3 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtp_dtls4 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls4 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
// The previous context is reset.
@@ -396,13 +395,13 @@
// enabled, SRTP is set up.
TEST_F(DtlsSrtpTransportTest,
RtcpMuxEnabledAfterRtpTransportHandshakeComplete) {
- auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
- auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
@@ -423,9 +422,9 @@
// Tests that when SetSend/RecvEncryptedHeaderExtensionIds is called, the SRTP
// sessions are updated with new encryped header extension IDs immediately.
TEST_F(DtlsSrtpTransportTest, EncryptedHeaderExtensionIdUpdated) {
- auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
MakeDtlsSrtpTransports(rtp_dtls1.get(), nullptr, rtp_dtls2.get(), nullptr,
@@ -449,9 +448,9 @@
// Tests if RTCP muxing is enabled. DtlsSrtpTransport is ready to send once the
// RTP DtlsTransport is ready.
TEST_F(DtlsSrtpTransportTest, SignalReadyToSendFiredWithRtcpMux) {
- auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
MakeDtlsSrtpTransports(rtp_dtls1.get(), nullptr, rtp_dtls2.get(), nullptr,
@@ -465,13 +464,13 @@
// Tests if RTCP muxing is not enabled. DtlsSrtpTransport is ready to send once
// both the RTP and RTCP DtlsTransport are ready.
TEST_F(DtlsSrtpTransportTest, SignalReadyToSendFiredWithoutRtcpMux) {
- auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
- auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
@@ -492,13 +491,13 @@
// when attempting to unprotect packets.
// Regression test for bugs.webrtc.org/8996
TEST_F(DtlsSrtpTransportTest, SrtpSessionNotResetWhenRtcpTransportRemoved) {
- auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
- auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
@@ -521,13 +520,13 @@
// Tests that RTCP packets can be sent and received if both sides actively reset
// the SRTP parameters with the |active_reset_srtp_params_| flag.
TEST_F(DtlsSrtpTransportTest, ActivelyResetSrtpParams) {
- auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls1 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
- auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
- auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto rtcp_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
diff --git a/pc/dtls_transport_unittest.cc b/pc/dtls_transport_unittest.cc
index c97c419..f7d7a88 100644
--- a/pc/dtls_transport_unittest.cc
+++ b/pc/dtls_transport_unittest.cc
@@ -56,7 +56,7 @@
DtlsTransportObserverInterface* observer() { return &observer_; }
void CreateTransport(rtc::FakeSSLCertificate* certificate = nullptr) {
- auto cricket_transport = absl::make_unique<FakeDtlsTransport>(
+ auto cricket_transport = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
if (certificate) {
cricket_transport->SetRemoteSSLCertificate(certificate);
@@ -68,7 +68,7 @@
void CompleteDtlsHandshake() {
auto fake_dtls1 = static_cast<FakeDtlsTransport*>(transport_->internal());
- auto fake_dtls2 = absl::make_unique<FakeDtlsTransport>(
+ auto fake_dtls2 = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
auto cert1 = rtc::RTCCertificate::Create(absl::WrapUnique(
rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT)));
@@ -84,7 +84,7 @@
};
TEST_F(DtlsTransportTest, CreateClearDelete) {
- auto cricket_transport = absl::make_unique<FakeDtlsTransport>(
+ auto cricket_transport = std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
rtc::scoped_refptr<DtlsTransport> webrtc_transport =
new rtc::RefCountedObject<DtlsTransport>(std::move(cricket_transport));
diff --git a/pc/ice_transport_unittest.cc b/pc/ice_transport_unittest.cc
index a801bba..3711a86 100644
--- a/pc/ice_transport_unittest.cc
+++ b/pc/ice_transport_unittest.cc
@@ -14,7 +14,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "api/ice_transport_factory.h"
#include "p2p/base/fake_ice_transport.h"
#include "p2p/base/fake_port_allocator.h"
@@ -28,7 +27,7 @@
TEST_F(IceTransportTest, CreateNonSelfDeletingTransport) {
auto cricket_transport =
- absl::make_unique<cricket::FakeIceTransport>("name", 0, nullptr);
+ std::make_unique<cricket::FakeIceTransport>("name", 0, nullptr);
rtc::scoped_refptr<IceTransportWithPointer> ice_transport =
new rtc::RefCountedObject<IceTransportWithPointer>(
cricket_transport.get());
@@ -39,7 +38,7 @@
TEST_F(IceTransportTest, CreateSelfDeletingTransport) {
std::unique_ptr<cricket::FakePortAllocator> port_allocator(
- absl::make_unique<cricket::FakePortAllocator>(nullptr, nullptr));
+ std::make_unique<cricket::FakePortAllocator>(nullptr, nullptr));
IceTransportInit init;
init.set_port_allocator(port_allocator.get());
auto ice_transport = CreateIceTransport(std::move(init));
diff --git a/pc/jsep_ice_candidate.cc b/pc/jsep_ice_candidate.cc
index c9dc9c1..4e45421 100644
--- a/pc/jsep_ice_candidate.cc
+++ b/pc/jsep_ice_candidate.cc
@@ -12,7 +12,6 @@
#include <memory>
-#include "absl/memory/memory.h"
#include "pc/webrtc_sdp.h"
namespace webrtc {
@@ -33,8 +32,8 @@
const std::string& sdp_mid,
int sdp_mline_index,
const cricket::Candidate& candidate) {
- return absl::make_unique<JsepIceCandidate>(sdp_mid, sdp_mline_index,
- candidate);
+ return std::make_unique<JsepIceCandidate>(sdp_mid, sdp_mline_index,
+ candidate);
}
JsepIceCandidate::JsepIceCandidate(const std::string& sdp_mid,
diff --git a/pc/jsep_session_description.cc b/pc/jsep_session_description.cc
index 4c04531..cc544dc 100644
--- a/pc/jsep_session_description.cc
+++ b/pc/jsep_session_description.cc
@@ -12,7 +12,6 @@
#include <memory>
-#include "absl/memory/memory.h"
#include "p2p/base/port.h"
#include "pc/media_session.h"
#include "pc/webrtc_sdp.h"
@@ -152,7 +151,7 @@
SdpType type,
const std::string& sdp,
SdpParseError* error_out) {
- auto jsep_desc = absl::make_unique<JsepSessionDescription>(type);
+ auto jsep_desc = std::make_unique<JsepSessionDescription>(type);
if (!SdpDeserialize(sdp, jsep_desc.get(), error_out)) {
return nullptr;
}
@@ -164,7 +163,7 @@
const std::string& session_id,
const std::string& session_version,
std::unique_ptr<cricket::SessionDescription> description) {
- auto jsep_description = absl::make_unique<JsepSessionDescription>(type);
+ auto jsep_description = std::make_unique<JsepSessionDescription>(type);
bool initialize_success = jsep_description->Initialize(
std::move(description), session_id, session_version);
RTC_DCHECK(initialize_success);
diff --git a/pc/jsep_session_description_unittest.cc b/pc/jsep_session_description_unittest.cc
index ef86ef4..8caac94 100644
--- a/pc/jsep_session_description_unittest.cc
+++ b/pc/jsep_session_description_unittest.cc
@@ -18,7 +18,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "api/candidate.h"
#include "api/jsep.h"
#include "api/jsep_ice_candidate.h"
@@ -57,12 +56,12 @@
// In SDP this is described by two m lines, one audio and one video.
static std::unique_ptr<cricket::SessionDescription>
CreateCricketSessionDescription() {
- auto desc = absl::make_unique<cricket::SessionDescription>();
+ auto desc = std::make_unique<cricket::SessionDescription>();
// AudioContentDescription
- auto audio = absl::make_unique<cricket::AudioContentDescription>();
+ auto audio = std::make_unique<cricket::AudioContentDescription>();
// VideoContentDescription
- auto video = absl::make_unique<cricket::VideoContentDescription>();
+ auto video = std::make_unique<cricket::VideoContentDescription>();
audio->AddCodec(cricket::AudioCodec(103, "ISAC", 16000, 0, 0));
desc->AddContent(cricket::CN_AUDIO, MediaProtocolType::kRtp,
@@ -95,7 +94,7 @@
candidate_ = candidate;
const std::string session_id = rtc::ToString(rtc::CreateRandomId64());
const std::string session_version = rtc::ToString(rtc::CreateRandomId());
- jsep_desc_ = absl::make_unique<JsepSessionDescription>(SdpType::kOffer);
+ jsep_desc_ = std::make_unique<JsepSessionDescription>(SdpType::kOffer);
ASSERT_TRUE(jsep_desc_->Initialize(CreateCricketSessionDescription(),
session_id, session_version));
}
@@ -109,7 +108,7 @@
std::unique_ptr<SessionDescriptionInterface> DeSerialize(
const std::string& sdp) {
- auto jsep_desc = absl::make_unique<JsepSessionDescription>(SdpType::kOffer);
+ auto jsep_desc = std::make_unique<JsepSessionDescription>(SdpType::kOffer);
EXPECT_TRUE(webrtc::SdpDeserialize(sdp, jsep_desc.get(), nullptr));
return std::move(jsep_desc);
}
diff --git a/pc/jsep_transport.cc b/pc/jsep_transport.cc
index 5777873..22f4f8d 100644
--- a/pc/jsep_transport.cc
+++ b/pc/jsep_transport.cc
@@ -17,7 +17,6 @@
#include <type_traits>
#include <utility> // for std::pair
-#include "absl/memory/memory.h"
#include "api/array_view.h"
#include "api/candidate.h"
#include "p2p/base/p2p_constants.h"
@@ -145,7 +144,7 @@
}
if (datagram_rtp_transport_ && default_rtp_transport()) {
- composite_rtp_transport_ = absl::make_unique<webrtc::CompositeRtpTransport>(
+ composite_rtp_transport_ = std::make_unique<webrtc::CompositeRtpTransport>(
std::vector<webrtc::RtpTransportInternal*>{
datagram_rtp_transport_.get(), default_rtp_transport()});
}
@@ -606,7 +605,7 @@
rtc::SSLFingerprint* remote_fp =
remote_description_->transport_desc.identity_fingerprint.get();
if (remote_fp && local_fp) {
- remote_fingerprint = absl::make_unique<rtc::SSLFingerprint>(*remote_fp);
+ remote_fingerprint = std::make_unique<rtc::SSLFingerprint>(*remote_fp);
webrtc::RTCError error =
NegotiateDtlsRole(local_description_type,
local_description_->transport_desc.connection_role,
@@ -621,7 +620,7 @@
"Local fingerprint supplied when caller didn't offer DTLS.");
} else {
// We are not doing DTLS
- remote_fingerprint = absl::make_unique<rtc::SSLFingerprint>(
+ remote_fingerprint = std::make_unique<rtc::SSLFingerprint>(
"", rtc::ArrayView<const uint8_t>());
}
// Now that we have negotiated everything, push it downward.
diff --git a/pc/jsep_transport_controller.cc b/pc/jsep_transport_controller.cc
index 10250ce..4f70009 100644
--- a/pc/jsep_transport_controller.cc
+++ b/pc/jsep_transport_controller.cc
@@ -14,7 +14,6 @@
#include <utility>
#include "absl/algorithm/container.h"
-#include "absl/memory/memory.h"
#include "api/transport/datagram_transport_interface.h"
#include "api/transport/media/media_transport_interface.h"
#include "p2p/base/ice_transport_internal.h"
@@ -476,7 +475,7 @@
return config_.external_transport_factory->CreateIceTransport(
transport_name, component);
} else {
- return absl::make_unique<cricket::P2PTransportChannel>(
+ return std::make_unique<cricket::P2PTransportChannel>(
transport_name, component, port_allocator_, async_resolver_factory_,
config_.event_log);
}
@@ -500,14 +499,14 @@
// If media transport is used for both media and data channels,
// then we don't need to create DTLS.
// Otherwise, DTLS is still created.
- dtls = absl::make_unique<cricket::NoOpDtlsTransport>(
- ice, config_.crypto_options);
+ dtls = std::make_unique<cricket::NoOpDtlsTransport>(ice,
+ config_.crypto_options);
} else if (config_.external_transport_factory) {
dtls = config_.external_transport_factory->CreateDtlsTransport(
ice, config_.crypto_options);
} else {
- dtls = absl::make_unique<cricket::DtlsTransport>(
- ice, config_.crypto_options, config_.event_log);
+ dtls = std::make_unique<cricket::DtlsTransport>(ice, config_.crypto_options,
+ config_.event_log);
}
RTC_DCHECK(dtls);
@@ -553,7 +552,7 @@
rtc::PacketTransportInternal* rtcp_packet_transport) {
RTC_DCHECK(network_thread_->IsCurrent());
auto unencrypted_rtp_transport =
- absl::make_unique<RtpTransport>(rtcp_packet_transport == nullptr);
+ std::make_unique<RtpTransport>(rtcp_packet_transport == nullptr);
unencrypted_rtp_transport->SetRtpPacketTransport(rtp_packet_transport);
if (rtcp_packet_transport) {
unencrypted_rtp_transport->SetRtcpPacketTransport(rtcp_packet_transport);
@@ -568,7 +567,7 @@
cricket::DtlsTransportInternal* rtcp_dtls_transport) {
RTC_DCHECK(network_thread_->IsCurrent());
auto srtp_transport =
- absl::make_unique<webrtc::SrtpTransport>(rtcp_dtls_transport == nullptr);
+ std::make_unique<webrtc::SrtpTransport>(rtcp_dtls_transport == nullptr);
RTC_DCHECK(rtp_dtls_transport);
srtp_transport->SetRtpPacketTransport(rtp_dtls_transport);
if (rtcp_dtls_transport) {
@@ -586,7 +585,7 @@
cricket::DtlsTransportInternal* rtp_dtls_transport,
cricket::DtlsTransportInternal* rtcp_dtls_transport) {
RTC_DCHECK(network_thread_->IsCurrent());
- auto dtls_srtp_transport = absl::make_unique<webrtc::DtlsSrtpTransport>(
+ auto dtls_srtp_transport = std::make_unique<webrtc::DtlsSrtpTransport>(
rtcp_dtls_transport == nullptr);
if (config_.enable_external_auth) {
dtls_srtp_transport->EnableExternalAuth();
@@ -1209,7 +1208,7 @@
RTC_LOG(LS_INFO) << "Creating UnencryptedRtpTransport, because datagram "
"transport is used.";
RTC_DCHECK(!rtcp_dtls_transport);
- datagram_rtp_transport = absl::make_unique<DatagramRtpTransport>(
+ datagram_rtp_transport = std::make_unique<DatagramRtpTransport>(
content_info.media_description()->rtp_header_extensions(), ice.get(),
datagram_transport.get());
}
@@ -1230,7 +1229,7 @@
}
std::unique_ptr<cricket::JsepTransport> jsep_transport =
- absl::make_unique<cricket::JsepTransport>(
+ std::make_unique<cricket::JsepTransport>(
content_info.name, certificate_, std::move(ice), std::move(rtcp_ice),
std::move(unencrypted_rtp_transport), std::move(sdes_transport),
std::move(dtls_srtp_transport), std::move(datagram_rtp_transport),
diff --git a/pc/jsep_transport_controller_unittest.cc b/pc/jsep_transport_controller_unittest.cc
index 35ebb87..70cbe96 100644
--- a/pc/jsep_transport_controller_unittest.cc
+++ b/pc/jsep_transport_controller_unittest.cc
@@ -13,7 +13,6 @@
#include <map>
#include <memory>
-#include "absl/memory/memory.h"
#include "api/test/fake_media_transport.h"
#include "api/test/loopback_media_transport.h"
#include "api/transport/media/media_transport_interface.h"
@@ -65,14 +64,14 @@
std::unique_ptr<cricket::IceTransportInternal> CreateIceTransport(
const std::string& transport_name,
int component) override {
- return absl::make_unique<cricket::FakeIceTransport>(transport_name,
- component);
+ return std::make_unique<cricket::FakeIceTransport>(transport_name,
+ component);
}
std::unique_ptr<cricket::DtlsTransportInternal> CreateDtlsTransport(
cricket::IceTransportInternal* ice,
const webrtc::CryptoOptions& crypto_options) override {
- return absl::make_unique<FakeDtlsTransport>(
+ return std::make_unique<FakeDtlsTransport>(
static_cast<cricket::FakeIceTransport*>(ice));
}
};
@@ -82,7 +81,7 @@
public sigslot::has_slots<> {
public:
JsepTransportControllerTest() : signaling_thread_(rtc::Thread::Current()) {
- fake_transport_factory_ = absl::make_unique<FakeTransportFactory>();
+ fake_transport_factory_ = std::make_unique<FakeTransportFactory>();
}
void CreateJsepTransportController(
@@ -94,7 +93,7 @@
// The tests only works with |fake_transport_factory|;
config.external_transport_factory = fake_transport_factory_.get();
// TODO(zstein): Provide an AsyncResolverFactory once it is required.
- transport_controller_ = absl::make_unique<JsepTransportController>(
+ transport_controller_ = std::make_unique<JsepTransportController>(
signaling_thread, network_thread, port_allocator, nullptr, config);
ConnectTransportControllerSignals();
}
@@ -114,7 +113,7 @@
std::unique_ptr<cricket::SessionDescription>
CreateSessionDescriptionWithoutBundle() {
- auto description = absl::make_unique<cricket::SessionDescription>();
+ auto description = std::make_unique<cricket::SessionDescription>();
AddAudioSection(description.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
@@ -957,7 +956,7 @@
rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT)));
rtc::scoped_refptr<rtc::RTCCertificate> returned_certificate;
- auto description = absl::make_unique<cricket::SessionDescription>();
+ auto description = std::make_unique<cricket::SessionDescription>();
AddAudioSection(description.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
certificate1);
@@ -1015,11 +1014,11 @@
rtc::SSLIdentity::Generate("answer", rtc::KT_DEFAULT)));
transport_controller_->SetLocalCertificate(offer_certificate);
- auto offer_desc = absl::make_unique<cricket::SessionDescription>();
+ auto offer_desc = std::make_unique<cricket::SessionDescription>();
AddAudioSection(offer_desc.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
offer_certificate);
- auto answer_desc = absl::make_unique<cricket::SessionDescription>();
+ auto answer_desc = std::make_unique<cricket::SessionDescription>();
AddAudioSection(answer_desc.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
answer_certificate);
@@ -1485,11 +1484,11 @@
TEST_F(JsepTransportControllerTest, IceRoleRedeterminedOnIceRestartByDefault) {
CreateJsepTransportController(JsepTransportController::Config());
// Let the |transport_controller_| be the controlled side initially.
- auto remote_offer = absl::make_unique<cricket::SessionDescription>();
+ auto remote_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(remote_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
- auto local_answer = absl::make_unique<cricket::SessionDescription>();
+ auto local_answer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_answer.get(), kAudioMid1, kIceUfrag2, kIcePwd2,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
nullptr);
@@ -1507,7 +1506,7 @@
fake_dtls->fake_ice_transport()->GetIceRole());
// New offer will trigger the ICE restart.
- auto restart_local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto restart_local_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(restart_local_offer.get(), kAudioMid1, kIceUfrag3, kIcePwd3,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
@@ -1528,11 +1527,11 @@
CreateJsepTransportController(config);
// Let the |transport_controller_| be the controlled side initially.
- auto remote_offer = absl::make_unique<cricket::SessionDescription>();
+ auto remote_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(remote_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
- auto local_answer = absl::make_unique<cricket::SessionDescription>();
+ auto local_answer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_answer.get(), kAudioMid1, kIceUfrag2, kIcePwd2,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
nullptr);
@@ -1550,7 +1549,7 @@
fake_dtls->fake_ice_transport()->GetIceRole());
// New offer will trigger the ICE restart.
- auto restart_local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto restart_local_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(restart_local_offer.get(), kAudioMid1, kIceUfrag3, kIcePwd3,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
@@ -1565,7 +1564,7 @@
// Tests ICE-Lite mode in remote answer.
TEST_F(JsepTransportControllerTest, SetIceRoleWhenIceLiteInRemoteAnswer) {
CreateJsepTransportController(JsepTransportController::Config());
- auto local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto local_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
@@ -1579,7 +1578,7 @@
EXPECT_EQ(cricket::ICEMODE_FULL,
fake_dtls->fake_ice_transport()->remote_ice_mode());
- auto remote_answer = absl::make_unique<cricket::SessionDescription>();
+ auto remote_answer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag2, kIcePwd2,
cricket::ICEMODE_LITE, cricket::CONNECTIONROLE_PASSIVE,
nullptr);
@@ -1598,11 +1597,11 @@
TEST_F(JsepTransportControllerTest,
IceRoleIsControllingAfterIceRestartFromIceLiteEndpoint) {
CreateJsepTransportController(JsepTransportController::Config());
- auto remote_offer = absl::make_unique<cricket::SessionDescription>();
+ auto remote_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(remote_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_LITE, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
- auto local_answer = absl::make_unique<cricket::SessionDescription>();
+ auto local_answer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
nullptr);
@@ -1620,11 +1619,11 @@
fake_dtls->fake_ice_transport()->GetIceRole());
// In the subsequence remote offer triggers an ICE restart.
- auto remote_offer2 = absl::make_unique<cricket::SessionDescription>();
+ auto remote_offer2 = std::make_unique<cricket::SessionDescription>();
AddAudioSection(remote_offer2.get(), kAudioMid1, kIceUfrag2, kIcePwd2,
cricket::ICEMODE_LITE, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
- auto local_answer2 = absl::make_unique<cricket::SessionDescription>();
+ auto local_answer2 = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_answer2.get(), kAudioMid1, kIceUfrag2, kIcePwd2,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
nullptr);
@@ -1651,7 +1650,7 @@
bundle_group.AddContentName(kVideoMid1);
bundle_group.AddContentName(kDataMid1);
- auto local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto local_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
@@ -1666,7 +1665,7 @@
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
- auto remote_answer = absl::make_unique<cricket::SessionDescription>();
+ auto remote_answer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
nullptr);
@@ -1724,7 +1723,7 @@
bundle_group.AddContentName(kAudioMid1);
bundle_group.AddContentName(kVideoMid1);
- auto local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto local_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
@@ -1735,7 +1734,7 @@
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
- auto remote_answer = absl::make_unique<cricket::SessionDescription>();
+ auto remote_answer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
nullptr);
@@ -1776,12 +1775,12 @@
cricket::ContentGroup bundle_group(cricket::GROUP_TYPE_BUNDLE);
bundle_group.AddContentName(kDataMid1);
- auto local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto local_offer = std::make_unique<cricket::SessionDescription>();
AddDataSection(local_offer.get(), kDataMid1,
cricket::MediaProtocolType::kSctp, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
- auto remote_answer = absl::make_unique<cricket::SessionDescription>();
+ auto remote_answer = std::make_unique<cricket::SessionDescription>();
AddDataSection(remote_answer.get(), kDataMid1,
cricket::MediaProtocolType::kSctp, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
@@ -1839,7 +1838,7 @@
bundle_group.AddContentName(kVideoMid1);
bundle_group.AddContentName(kDataMid1);
- auto local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto local_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
@@ -1851,7 +1850,7 @@
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
- auto remote_answer = absl::make_unique<cricket::SessionDescription>();
+ auto remote_answer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
nullptr);
@@ -1898,7 +1897,7 @@
bundle_group.AddContentName(kAudioMid1);
bundle_group.AddContentName(kVideoMid1);
- auto local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto local_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
@@ -1906,7 +1905,7 @@
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
- auto remote_answer = absl::make_unique<cricket::SessionDescription>();
+ auto remote_answer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
nullptr);
@@ -1948,7 +1947,7 @@
bundle_group.AddContentName(kVideoMid1);
bundle_group.AddContentName(kDataMid1);
- auto local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto local_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
@@ -1960,7 +1959,7 @@
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
- auto remote_answer = absl::make_unique<cricket::SessionDescription>();
+ auto remote_answer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
nullptr);
@@ -2001,7 +2000,7 @@
JsepTransportController::Config config;
config.rtcp_mux_policy = PeerConnectionInterface::kRtcpMuxPolicyRequire;
CreateJsepTransportController(config);
- auto local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto local_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
@@ -2019,7 +2018,7 @@
JsepTransportController::Config config;
config.rtcp_mux_policy = PeerConnectionInterface::kRtcpMuxPolicyRequire;
CreateJsepTransportController(config);
- auto local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto local_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
@@ -2027,7 +2026,7 @@
->SetLocalDescription(SdpType::kOffer, local_offer.get())
.ok());
- auto remote_answer = absl::make_unique<cricket::SessionDescription>();
+ auto remote_answer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
nullptr);
@@ -2129,7 +2128,7 @@
TEST_F(JsepTransportControllerTest, ChangeTaggedMediaSectionMaxBundle) {
CreateJsepTransportController(JsepTransportController::Config());
- auto local_offer = absl::make_unique<cricket::SessionDescription>();
+ auto local_offer = std::make_unique<cricket::SessionDescription>();
AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
nullptr);
diff --git a/pc/jsep_transport_unittest.cc b/pc/jsep_transport_unittest.cc
index 1e51392..123482c 100644
--- a/pc/jsep_transport_unittest.cc
+++ b/pc/jsep_transport_unittest.cc
@@ -14,7 +14,6 @@
#include <tuple>
#include <utility>
-#include "absl/memory/memory.h"
#include "media/base/fake_rtp.h"
#include "p2p/base/fake_dtls_transport.h"
#include "p2p/base/fake_ice_transport.h"
@@ -46,7 +45,7 @@
std::unique_ptr<webrtc::SrtpTransport> CreateSdesTransport(
rtc::PacketTransportInternal* rtp_packet_transport,
rtc::PacketTransportInternal* rtcp_packet_transport) {
- auto srtp_transport = absl::make_unique<webrtc::SrtpTransport>(
+ auto srtp_transport = std::make_unique<webrtc::SrtpTransport>(
rtcp_packet_transport == nullptr);
srtp_transport->SetRtpPacketTransport(rtp_packet_transport);
@@ -59,7 +58,7 @@
std::unique_ptr<webrtc::DtlsSrtpTransport> CreateDtlsSrtpTransport(
cricket::DtlsTransportInternal* rtp_dtls_transport,
cricket::DtlsTransportInternal* rtcp_dtls_transport) {
- auto dtls_srtp_transport = absl::make_unique<webrtc::DtlsSrtpTransport>(
+ auto dtls_srtp_transport = std::make_unique<webrtc::DtlsSrtpTransport>(
rtcp_dtls_transport == nullptr);
dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport,
rtcp_dtls_transport);
@@ -70,17 +69,16 @@
// FakeIceTransport.
std::unique_ptr<JsepTransport> CreateJsepTransport2(bool rtcp_mux_enabled,
SrtpMode srtp_mode) {
- auto ice = absl::make_unique<FakeIceTransport>(kTransportName,
- ICE_CANDIDATE_COMPONENT_RTP);
- auto rtp_dtls_transport = absl::make_unique<FakeDtlsTransport>(ice.get());
+ auto ice = std::make_unique<FakeIceTransport>(kTransportName,
+ ICE_CANDIDATE_COMPONENT_RTP);
+ auto rtp_dtls_transport = std::make_unique<FakeDtlsTransport>(ice.get());
std::unique_ptr<FakeIceTransport> rtcp_ice;
std::unique_ptr<FakeDtlsTransport> rtcp_dtls_transport;
if (!rtcp_mux_enabled) {
- rtcp_ice = absl::make_unique<FakeIceTransport>(
+ rtcp_ice = std::make_unique<FakeIceTransport>(
kTransportName, ICE_CANDIDATE_COMPONENT_RTCP);
- rtcp_dtls_transport =
- absl::make_unique<FakeDtlsTransport>(rtcp_ice.get());
+ rtcp_dtls_transport = std::make_unique<FakeDtlsTransport>(rtcp_ice.get());
}
std::unique_ptr<webrtc::RtpTransport> unencrypted_rtp_transport;
@@ -105,7 +103,7 @@
// media_transport = nullptr. In the future we will probably add
// more logic that require unit tests. Note that creation of media_transport
// is covered in jseptransportcontroller_unittest.
- auto jsep_transport = absl::make_unique<JsepTransport>(
+ auto jsep_transport = std::make_unique<JsepTransport>(
kTransportName, /*local_certificate=*/nullptr, std::move(ice),
std::move(rtcp_ice), std::move(unencrypted_rtp_transport),
std::move(sdes_transport), std::move(dtls_srtp_transport),
diff --git a/pc/media_session.cc b/pc/media_session.cc
index e229ed6..ff9c17b 100644
--- a/pc/media_session.cc
+++ b/pc/media_session.cc
@@ -19,7 +19,6 @@
#include <utility>
#include "absl/algorithm/container.h"
-#include "absl/memory/memory.h"
#include "absl/strings/match.h"
#include "absl/types/optional.h"
#include "api/crypto_params.h"
@@ -1431,7 +1430,7 @@
session_options.offer_extmap_allow_mixed,
&audio_rtp_extensions, &video_rtp_extensions);
- auto offer = absl::make_unique<SessionDescription>();
+ auto offer = std::make_unique<SessionDescription>();
// Iterate through the media description options, matching with existing media
// descriptions in |current_description|.
@@ -1576,7 +1575,7 @@
FilterDataCodecs(&answer_rtp_data_codecs,
session_options.data_channel_type == DCT_SCTP);
- auto answer = absl::make_unique<SessionDescription>();
+ auto answer = std::make_unique<SessionDescription>();
// If the offer supports BUNDLE, and we want to use it too, create a BUNDLE
// group in the answer with the appropriate content names.
@@ -2536,7 +2535,7 @@
std::unique_ptr<MediaContentDescription> data_answer;
if (offer_content->media_description()->as_sctp()) {
// SCTP data content
- data_answer = absl::make_unique<SctpDataContentDescription>();
+ data_answer = std::make_unique<SctpDataContentDescription>();
const SctpDataContentDescription* offer_data_description =
offer_content->media_description()->as_sctp();
// Respond with the offerer's proto, whatever it is.
@@ -2564,7 +2563,7 @@
data_answer->as_sctp()->set_use_sctpmap(offer_uses_sctpmap);
} else {
// RTP offer
- data_answer = absl::make_unique<RtpDataContentDescription>();
+ data_answer = std::make_unique<RtpDataContentDescription>();
const RtpDataContentDescription* offer_data_description =
offer_content->media_description()->as_rtp_data();
diff --git a/pc/media_session_unittest.cc b/pc/media_session_unittest.cc
index a0d9d0c..e3778d6 100644
--- a/pc/media_session_unittest.cc
+++ b/pc/media_session_unittest.cc
@@ -485,7 +485,7 @@
std::unique_ptr<SessionDescription> current_desc;
std::unique_ptr<SessionDescription> desc;
if (has_current_desc) {
- current_desc = absl::make_unique<SessionDescription>();
+ current_desc = std::make_unique<SessionDescription>();
current_desc->AddTransportInfo(TransportInfo(
"audio",
TransportDescription(current_audio_ufrag, current_audio_pwd)));
@@ -3283,7 +3283,7 @@
cricket::ContentGroup group(cricket::CN_AUDIO);
source.AddGroup(group);
std::unique_ptr<AudioContentDescription> acd =
- absl::make_unique<AudioContentDescription>();
+ std::make_unique<AudioContentDescription>();
acd->set_codecs(MAKE_VECTOR(kAudioCodecs1));
acd->AddLegacyStream(1);
std::unique_ptr<AudioContentDescription> acd_passed =
@@ -3291,7 +3291,7 @@
source.AddContent(cricket::CN_AUDIO, MediaProtocolType::kRtp,
std::move(acd_passed));
std::unique_ptr<VideoContentDescription> vcd =
- absl::make_unique<VideoContentDescription>();
+ std::make_unique<VideoContentDescription>();
vcd->set_codecs(MAKE_VECTOR(kVideoCodecs1));
vcd->AddLegacyStream(2);
std::unique_ptr<VideoContentDescription> vcd_passed =
diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc
index 6f0fd60..ed93643 100644
--- a/pc/peer_connection.cc
+++ b/pc/peer_connection.cc
@@ -12,13 +12,13 @@
#include <algorithm>
#include <limits>
+#include <memory>
#include <queue>
#include <set>
#include <utility>
#include <vector>
#include "absl/algorithm/container.h"
-#include "absl/memory/memory.h"
#include "absl/strings/match.h"
#include "api/jsep_ice_candidate.h"
#include "api/jsep_session_description.h"
@@ -6803,7 +6803,7 @@
}
RTC_LOG(LS_INFO) << "Setting up data channel transport for mid=" << mid;
- data_channel_transport_invoker_ = absl::make_unique<rtc::AsyncInvoker>();
+ data_channel_transport_invoker_ = std::make_unique<rtc::AsyncInvoker>();
data_channel_transport_->SetDataSink(this);
sctp_mid_ = mid;
// TODO(mellem): Handling data channel state through media transport is
diff --git a/pc/peer_connection_bundle_unittest.cc b/pc/peer_connection_bundle_unittest.cc
index 7780ac6..543c9be 100644
--- a/pc/peer_connection_bundle_unittest.cc
+++ b/pc/peer_connection_bundle_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <memory>
+
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/create_peerconnection_factory.h"
@@ -24,7 +26,6 @@
#ifdef WEBRTC_ANDROID
#include "pc/test/android_test_initializer.h"
#endif
-#include "absl/memory/memory.h"
#include "pc/test/fake_audio_capture_module.h"
#include "rtc_base/fake_network.h"
#include "rtc_base/gunit.h"
@@ -185,11 +186,11 @@
WrapperPtr CreatePeerConnection(const RTCConfiguration& config) {
auto* fake_network = NewFakeNetwork();
auto port_allocator =
- absl::make_unique<cricket::BasicPortAllocator>(fake_network);
+ std::make_unique<cricket::BasicPortAllocator>(fake_network);
port_allocator->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
cricket::PORTALLOCATOR_DISABLE_RELAY);
port_allocator->set_step_delay(cricket::kMinimumStepDelay);
- auto observer = absl::make_unique<MockPeerConnectionObserver>();
+ auto observer = std::make_unique<MockPeerConnectionObserver>();
RTCConfiguration modified_config = config;
modified_config.sdp_semantics = sdp_semantics_;
auto pc = pc_factory_->CreatePeerConnection(
@@ -198,7 +199,7 @@
return nullptr;
}
- auto wrapper = absl::make_unique<PeerConnectionWrapperForBundleTest>(
+ auto wrapper = std::make_unique<PeerConnectionWrapperForBundleTest>(
pc_factory_, pc, std::move(observer));
wrapper->set_network(fake_network);
return wrapper;
diff --git a/pc/peer_connection_crypto_unittest.cc b/pc/peer_connection_crypto_unittest.cc
index 077ac36..99eb5cd 100644
--- a/pc/peer_connection_crypto_unittest.cc
+++ b/pc/peer_connection_crypto_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <memory>
+
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/create_peerconnection_factory.h"
@@ -20,7 +22,6 @@
#ifdef WEBRTC_ANDROID
#include "pc/test/android_test_initializer.h"
#endif
-#include "absl/memory/memory.h"
#include "pc/test/fake_audio_capture_module.h"
#include "pc/test/fake_rtc_certificate_generator.h"
#include "rtc_base/gunit.h"
@@ -65,9 +66,9 @@
WrapperPtr CreatePeerConnection(
const RTCConfiguration& config,
std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_gen) {
- auto fake_port_allocator = absl::make_unique<cricket::FakePortAllocator>(
+ auto fake_port_allocator = std::make_unique<cricket::FakePortAllocator>(
rtc::Thread::Current(), nullptr);
- auto observer = absl::make_unique<MockPeerConnectionObserver>();
+ auto observer = std::make_unique<MockPeerConnectionObserver>();
RTCConfiguration modified_config = config;
modified_config.sdp_semantics = sdp_semantics_;
auto pc = pc_factory_->CreatePeerConnection(
@@ -78,8 +79,8 @@
}
observer->SetPeerConnectionInterface(pc.get());
- return absl::make_unique<PeerConnectionWrapper>(pc_factory_, pc,
- std::move(observer));
+ return std::make_unique<PeerConnectionWrapper>(pc_factory_, pc,
+ std::move(observer));
}
// Accepts the same arguments as CreatePeerConnection and adds default audio
@@ -591,7 +592,7 @@
RTCConfiguration config;
config.enable_dtls_srtp.emplace(true);
auto owned_fake_certificate_generator =
- absl::make_unique<FakeRTCCertificateGenerator>();
+ std::make_unique<FakeRTCCertificateGenerator>();
auto* fake_certificate_generator = owned_fake_certificate_generator.get();
fake_certificate_generator->set_should_fail(cert_gen_result_ ==
CertGenResult::kFail);
diff --git a/pc/peer_connection_data_channel_unittest.cc b/pc/peer_connection_data_channel_unittest.cc
index 609a718..81ef220 100644
--- a/pc/peer_connection_data_channel_unittest.cc
+++ b/pc/peer_connection_data_channel_unittest.cc
@@ -47,7 +47,6 @@
#ifdef WEBRTC_ANDROID
#include "pc/test/android_test_initializer.h"
#endif
-#include "absl/memory/memory.h"
#include "pc/test/fake_sctp_transport.h"
#include "rtc_base/virtual_socket_server.h"
@@ -90,13 +89,13 @@
rtc::Thread::Current(),
rtc::Thread::Current(),
rtc::Thread::Current(),
- absl::make_unique<cricket::FakeMediaEngine>(),
+ std::make_unique<cricket::FakeMediaEngine>(),
CreateCallFactory(),
- absl::make_unique<FakeMediaTransportFactory>())) {}
+ std::make_unique<FakeMediaTransportFactory>())) {}
std::unique_ptr<cricket::SctpTransportInternalFactory>
CreateSctpTransportInternalFactory() {
- auto factory = absl::make_unique<FakeSctpTransportFactory>();
+ auto factory = std::make_unique<FakeSctpTransportFactory>();
last_fake_sctp_transport_factory_ = factory.get();
return factory;
}
@@ -165,7 +164,7 @@
new PeerConnectionFactoryForDataChannelTest());
pc_factory->SetOptions(factory_options);
RTC_CHECK(pc_factory->Initialize());
- auto observer = absl::make_unique<MockPeerConnectionObserver>();
+ auto observer = std::make_unique<MockPeerConnectionObserver>();
RTCConfiguration modified_config = config;
modified_config.sdp_semantics = sdp_semantics_;
auto pc = pc_factory->CreatePeerConnection(modified_config, nullptr,
@@ -175,7 +174,7 @@
}
observer->SetPeerConnectionInterface(pc.get());
- auto wrapper = absl::make_unique<PeerConnectionWrapperForDataChannelTest>(
+ auto wrapper = std::make_unique<PeerConnectionWrapperForDataChannelTest>(
pc_factory, pc, std::move(observer));
RTC_DCHECK(pc_factory->last_fake_sctp_transport_factory_);
wrapper->set_sctp_transport_factory(
diff --git a/pc/peer_connection_end_to_end_unittest.cc b/pc/peer_connection_end_to_end_unittest.cc
index d9feb7d..435c523 100644
--- a/pc/peer_connection_end_to_end_unittest.cc
+++ b/pc/peer_connection_end_to_end_unittest.cc
@@ -10,7 +10,6 @@
#include <memory>
-#include "absl/memory/memory.h"
#include "absl/strings/match.h"
#include "api/audio_codecs/L16/audio_decoder_L16.h"
#include "api/audio_codecs/L16/audio_encoder_L16.h"
@@ -223,7 +222,7 @@
const auto dec = real_decoder.get(); // For lambda capturing.
auto mock_decoder =
- absl::make_unique<ForwardingMockDecoder>(std::move(real_decoder));
+ std::make_unique<ForwardingMockDecoder>(std::move(real_decoder));
EXPECT_CALL(*mock_decoder, Channels())
.Times(AtLeast(1))
.WillRepeatedly(Invoke([dec] { return dec->Channels(); }));
diff --git a/pc/peer_connection_factory.cc b/pc/peer_connection_factory.cc
index 16fb928..0800718 100644
--- a/pc/peer_connection_factory.cc
+++ b/pc/peer_connection_factory.cc
@@ -14,7 +14,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "api/fec_controller.h"
#include "api/media_stream_proxy.h"
#include "api/media_stream_track_proxy.h"
@@ -135,8 +134,8 @@
return false;
}
- channel_manager_ = absl::make_unique<cricket::ChannelManager>(
- std::move(media_engine_), absl::make_unique<cricket::RtpDataEngine>(),
+ channel_manager_ = std::make_unique<cricket::ChannelManager>(
+ std::move(media_engine_), std::make_unique<cricket::RtpDataEngine>(),
worker_thread_, network_thread_);
channel_manager_->SetVideoRtxEnabled(true);
@@ -249,8 +248,8 @@
// Set internal defaults if optional dependencies are not set.
if (!dependencies.cert_generator) {
dependencies.cert_generator =
- absl::make_unique<rtc::RTCCertificateGenerator>(signaling_thread_,
- network_thread_);
+ std::make_unique<rtc::RTCCertificateGenerator>(signaling_thread_,
+ network_thread_);
}
if (!dependencies.allocator) {
rtc::PacketSocketFactory* packet_socket_factory;
@@ -262,7 +261,7 @@
network_thread_->Invoke<void>(RTC_FROM_HERE, [this, &configuration,
&dependencies,
&packet_socket_factory]() {
- dependencies.allocator = absl::make_unique<cricket::BasicPortAllocator>(
+ dependencies.allocator = std::make_unique<cricket::BasicPortAllocator>(
default_network_manager_.get(), packet_socket_factory,
configuration.turn_customizer);
});
@@ -323,7 +322,7 @@
std::unique_ptr<cricket::SctpTransportInternalFactory>
PeerConnectionFactory::CreateSctpTransportInternalFactory() {
#ifdef HAVE_SCTP
- return absl::make_unique<cricket::SctpTransportFactory>(network_thread());
+ return std::make_unique<cricket::SctpTransportFactory>(network_thread());
#else
return nullptr;
#endif
@@ -341,7 +340,7 @@
encoding_type = RtcEventLog::EncodingType::NewFormat;
return event_log_factory_
? event_log_factory_->CreateRtcEventLog(encoding_type)
- : absl::make_unique<RtcEventLogNull>();
+ : std::make_unique<RtcEventLogNull>();
}
std::unique_ptr<Call> PeerConnectionFactory::CreateCall_w(
diff --git a/pc/peer_connection_histogram_unittest.cc b/pc/peer_connection_histogram_unittest.cc
index 2894c48..0aeb080 100644
--- a/pc/peer_connection_histogram_unittest.cc
+++ b/pc/peer_connection_histogram_unittest.cc
@@ -14,7 +14,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "absl/types/optional.h"
#include "api/call/call_factory_interface.h"
#include "api/jsep.h"
@@ -81,7 +80,7 @@
dependencies.signaling_thread = rtc::Thread::Current();
dependencies.task_queue_factory = CreateDefaultTaskQueueFactory();
dependencies.media_engine =
- absl::make_unique<cricket::FakeMediaEngine>();
+ std::make_unique<cricket::FakeMediaEngine>();
dependencies.call_factory = CreateCallFactory();
return dependencies;
}()) {}
@@ -255,13 +254,13 @@
WrapperPtr CreatePeerConnectionWithMdns(const RTCConfiguration& config) {
auto resolver_factory =
- absl::make_unique<NiceMock<webrtc::MockAsyncResolverFactory>>();
+ std::make_unique<NiceMock<webrtc::MockAsyncResolverFactory>>();
webrtc::PeerConnectionDependencies deps(nullptr /* observer_in */);
auto fake_network = NewFakeNetwork();
fake_network->set_mdns_responder(
- absl::make_unique<webrtc::FakeMdnsResponder>(rtc::Thread::Current()));
+ std::make_unique<webrtc::FakeMdnsResponder>(rtc::Thread::Current()));
fake_network->AddInterface(NextLocalAddress());
std::unique_ptr<cricket::BasicPortAllocator> port_allocator(
@@ -287,7 +286,7 @@
fake_network->AddInterface(kPrivateLocalAddress);
auto port_allocator =
- absl::make_unique<cricket::BasicPortAllocator>(fake_network);
+ std::make_unique<cricket::BasicPortAllocator>(fake_network);
return CreatePeerConnection(RTCConfiguration(),
PeerConnectionFactoryInterface::Options(),
@@ -300,7 +299,7 @@
fake_network->AddInterface(kPrivateIpv6LocalAddress);
auto port_allocator =
- absl::make_unique<cricket::BasicPortAllocator>(fake_network);
+ std::make_unique<cricket::BasicPortAllocator>(fake_network);
return CreatePeerConnection(RTCConfiguration(),
PeerConnectionFactoryInterface::Options(),
@@ -338,10 +337,10 @@
auto fake_network = NewFakeNetwork();
fake_network->AddInterface(NextLocalAddress());
deps.allocator =
- absl::make_unique<cricket::BasicPortAllocator>(fake_network);
+ std::make_unique<cricket::BasicPortAllocator>(fake_network);
}
- auto observer = absl::make_unique<ObserverForUsageHistogramTest>();
+ auto observer = std::make_unique<ObserverForUsageHistogramTest>();
deps.observer = observer.get();
auto pc = pc_factory->CreatePeerConnection(config, std::move(deps));
@@ -350,9 +349,8 @@
}
observer->SetPeerConnectionInterface(pc.get());
- auto wrapper =
- absl::make_unique<PeerConnectionWrapperForUsageHistogramTest>(
- pc_factory, pc, std::move(observer));
+ auto wrapper = std::make_unique<PeerConnectionWrapperForUsageHistogramTest>(
+ pc_factory, pc, std::move(observer));
return wrapper;
}
@@ -369,7 +367,7 @@
// Therefore, the test fixture will own all the fake networks even though
// tests should access the fake network through the PeerConnectionWrapper.
rtc::FakeNetworkManager* NewFakeNetwork() {
- fake_networks_.emplace_back(absl::make_unique<rtc::FakeNetworkManager>());
+ fake_networks_.emplace_back(std::make_unique<rtc::FakeNetworkManager>());
return fake_networks_.back().get();
}
@@ -719,7 +717,7 @@
ASSERT_TRUE(cur_offer);
std::string sdp_with_candidates_str;
cur_offer->ToString(&sdp_with_candidates_str);
- auto offer = absl::make_unique<JsepSessionDescription>(SdpType::kOffer);
+ auto offer = std::make_unique<JsepSessionDescription>(SdpType::kOffer);
ASSERT_TRUE(SdpDeserialize(sdp_with_candidates_str, offer.get(),
nullptr /* error */));
ASSERT_TRUE(callee->SetRemoteDescription(std::move(offer)));
diff --git a/pc/peer_connection_ice_unittest.cc b/pc/peer_connection_ice_unittest.cc
index 0ca4be2..61034d0 100644
--- a/pc/peer_connection_ice_unittest.cc
+++ b/pc/peer_connection_ice_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <memory>
+
#include "p2p/base/fake_port_allocator.h"
#include "p2p/base/test_stun_server.h"
#include "p2p/client/basic_port_allocator.h"
@@ -18,7 +20,6 @@
#ifdef WEBRTC_ANDROID
#include "pc/test/android_test_initializer.h"
#endif
-#include "absl/memory/memory.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/create_peerconnection_factory.h"
@@ -115,13 +116,13 @@
WrapperPtr CreatePeerConnection(const RTCConfiguration& config) {
auto* fake_network = NewFakeNetwork();
auto port_allocator =
- absl::make_unique<cricket::BasicPortAllocator>(fake_network);
+ std::make_unique<cricket::BasicPortAllocator>(fake_network);
port_allocator->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP |
cricket::PORTALLOCATOR_DISABLE_RELAY);
port_allocator->set_step_delay(cricket::kMinimumStepDelay);
RTCConfiguration modified_config = config;
modified_config.sdp_semantics = sdp_semantics_;
- auto observer = absl::make_unique<MockPeerConnectionObserver>();
+ auto observer = std::make_unique<MockPeerConnectionObserver>();
auto port_allocator_copy = port_allocator.get();
auto pc = pc_factory_->CreatePeerConnection(
modified_config, std::move(port_allocator), nullptr, observer.get());
@@ -130,7 +131,7 @@
}
observer->SetPeerConnectionInterface(pc.get());
- auto wrapper = absl::make_unique<PeerConnectionWrapperForIceTest>(
+ auto wrapper = std::make_unique<PeerConnectionWrapperForIceTest>(
pc_factory_, pc, std::move(observer));
wrapper->set_network(fake_network);
wrapper->port_allocator_ = port_allocator_copy;
diff --git a/pc/peer_connection_integrationtest.cc b/pc/peer_connection_integrationtest.cc
index 2151b5e..8798278 100644
--- a/pc/peer_connection_integrationtest.cc
+++ b/pc/peer_connection_integrationtest.cc
@@ -22,7 +22,6 @@
#include <vector>
#include "absl/algorithm/container.h"
-#include "absl/memory/memory.h"
#include "api/media_stream_interface.h"
#include "api/peer_connection_interface.h"
#include "api/peer_connection_proxy.h"
@@ -625,7 +624,7 @@
pc_factory_dependencies.event_log_factory = std::move(event_log_factory);
} else {
pc_factory_dependencies.event_log_factory =
- absl::make_unique<webrtc::RtcEventLogFactory>(
+ std::make_unique<webrtc::RtcEventLogFactory>(
pc_factory_dependencies.task_queue_factory.get());
}
if (media_transport_factory) {
@@ -905,7 +904,7 @@
ASSERT_TRUE(fake_video_renderers_.find(video_track->id()) ==
fake_video_renderers_.end());
fake_video_renderers_[video_track->id()] =
- absl::make_unique<FakeVideoTrackRenderer>(video_track);
+ std::make_unique<FakeVideoTrackRenderer>(video_track);
}
}
void OnRemoveTrack(
@@ -1235,7 +1234,7 @@
modified_config.sdp_semantics = sdp_semantics_;
if (!dependencies.cert_generator) {
dependencies.cert_generator =
- absl::make_unique<FakeRTCCertificateGenerator>();
+ std::make_unique<FakeRTCCertificateGenerator>();
}
std::unique_ptr<PeerConnectionWrapper> client(
new PeerConnectionWrapper(debug_name));
@@ -1384,7 +1383,7 @@
network_thread()->Invoke<std::unique_ptr<cricket::TestTurnServer>>(
RTC_FROM_HERE,
[thread, internal_address, external_address, type, common_name] {
- return absl::make_unique<cricket::TestTurnServer>(
+ return std::make_unique<cricket::TestTurnServer>(
thread, internal_address, external_address, type,
/*ignore_bad_certs=*/true, common_name);
});
@@ -1397,7 +1396,7 @@
std::unique_ptr<cricket::TestTurnCustomizer> turn_customizer =
network_thread()->Invoke<std::unique_ptr<cricket::TestTurnCustomizer>>(
RTC_FROM_HERE,
- [] { return absl::make_unique<cricket::TestTurnCustomizer>(); });
+ [] { return std::make_unique<cricket::TestTurnCustomizer>(); });
turn_customizers_.push_back(std::move(turn_customizer));
// Interactions with the turn customizer should be done on the network
// thread.
@@ -4072,9 +4071,9 @@
TEST_P(PeerConnectionIntegrationTest,
IceStatesReachCompletionWithRemoteHostname) {
auto caller_resolver_factory =
- absl::make_unique<NiceMock<webrtc::MockAsyncResolverFactory>>();
+ std::make_unique<NiceMock<webrtc::MockAsyncResolverFactory>>();
auto callee_resolver_factory =
- absl::make_unique<NiceMock<webrtc::MockAsyncResolverFactory>>();
+ std::make_unique<NiceMock<webrtc::MockAsyncResolverFactory>>();
NiceMock<rtc::MockAsyncResolver> callee_async_resolver;
NiceMock<rtc::MockAsyncResolver> caller_async_resolver;
@@ -4102,9 +4101,9 @@
// Enable hostname candidates with mDNS names.
caller()->SetMdnsResponder(
- absl::make_unique<webrtc::FakeMdnsResponder>(network_thread()));
+ std::make_unique<webrtc::FakeMdnsResponder>(network_thread()));
callee()->SetMdnsResponder(
- absl::make_unique<webrtc::FakeMdnsResponder>(network_thread()));
+ std::make_unique<webrtc::FakeMdnsResponder>(network_thread()));
SetPortAllocatorFlags(kOnlyLocalPorts, kOnlyLocalPorts);
@@ -5127,7 +5126,7 @@
ASSERT_TRUE(CreatePeerConnectionWrappers());
ConnectFakeSignaling();
- auto output = absl::make_unique<testing::NiceMock<MockRtcEventLogOutput>>();
+ auto output = std::make_unique<testing::NiceMock<MockRtcEventLogOutput>>();
ON_CALL(*output, IsActive()).WillByDefault(::testing::Return(true));
ON_CALL(*output, Write(::testing::_)).WillByDefault(::testing::Return(true));
EXPECT_CALL(*output, Write(::testing::_)).Times(::testing::AtLeast(1));
diff --git a/pc/peer_connection_interface_unittest.cc b/pc/peer_connection_interface_unittest.cc
index f9c40c2..2d0687c 100644
--- a/pc/peer_connection_interface_unittest.cc
+++ b/pc/peer_connection_interface_unittest.cc
@@ -19,7 +19,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "absl/strings/str_replace.h"
#include "absl/types/optional.h"
#include "api/audio/audio_mixer.h"
@@ -656,7 +655,7 @@
dependencies.media_engine =
cricket::CreateMediaEngine(std::move(media_deps));
dependencies.call_factory = webrtc::CreateCallFactory();
- dependencies.event_log_factory = absl::make_unique<RtcEventLogFactory>(
+ dependencies.event_log_factory = std::make_unique<RtcEventLogFactory>(
dependencies.task_queue_factory.get());
return new rtc::RefCountedObject<PeerConnectionFactoryForTest>(
@@ -3463,7 +3462,7 @@
pc_->Close();
EXPECT_FALSE(
- pc_->StartRtcEventLog(absl::make_unique<webrtc::RtcEventLogOutputNull>(),
+ pc_->StartRtcEventLog(std::make_unique<webrtc::RtcEventLogOutputNull>(),
webrtc::RtcEventLog::kImmediateOutput));
pc_->StopRtcEventLog();
}
diff --git a/pc/peer_connection_jsep_unittest.cc b/pc/peer_connection_jsep_unittest.cc
index 2afb72b..1fe8d07 100644
--- a/pc/peer_connection_jsep_unittest.cc
+++ b/pc/peer_connection_jsep_unittest.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <memory>
+
#include "api/task_queue/default_task_queue_factory.h"
#include "media/engine/webrtc_media_engine.h"
#include "media/engine/webrtc_media_engine_defaults.h"
@@ -18,7 +20,6 @@
#ifdef WEBRTC_ANDROID
#include "pc/test/android_test_initializer.h"
#endif
-#include "absl/memory/memory.h"
#include "pc/test/fake_audio_capture_module.h"
#include "pc/test/fake_sctp_transport.h"
#include "rtc_base/gunit.h"
@@ -61,7 +62,7 @@
std::unique_ptr<cricket::SctpTransportInternalFactory>
CreateSctpTransportInternalFactory() {
- return absl::make_unique<FakeSctpTransportFactory>();
+ return std::make_unique<FakeSctpTransportFactory>();
}
};
@@ -86,7 +87,7 @@
rtc::scoped_refptr<PeerConnectionFactory> pc_factory(
new rtc::RefCountedObject<PeerConnectionFactoryForJsepTest>());
RTC_CHECK(pc_factory->Initialize());
- auto observer = absl::make_unique<MockPeerConnectionObserver>();
+ auto observer = std::make_unique<MockPeerConnectionObserver>();
auto pc = pc_factory->CreatePeerConnection(config, nullptr, nullptr,
observer.get());
if (!pc) {
@@ -94,8 +95,8 @@
}
observer->SetPeerConnectionInterface(pc.get());
- return absl::make_unique<PeerConnectionWrapper>(pc_factory, pc,
- std::move(observer));
+ return std::make_unique<PeerConnectionWrapper>(pc_factory, pc,
+ std::move(observer));
}
std::unique_ptr<rtc::VirtualSocketServer> vss_;
diff --git a/pc/peer_connection_media_unittest.cc b/pc/peer_connection_media_unittest.cc
index a980334..62368a2 100644
--- a/pc/peer_connection_media_unittest.cc
+++ b/pc/peer_connection_media_unittest.cc
@@ -12,6 +12,7 @@
// PeerConnection and the underlying media engine, as well as tests that check
// the media-related aspects of SDP.
+#include <memory>
#include <tuple>
#include "absl/algorithm/container.h"
@@ -29,7 +30,6 @@
#ifdef WEBRTC_ANDROID
#include "pc/test/android_test_initializer.h"
#endif
-#include "absl/memory/memory.h"
#include "pc/test/fake_rtc_certificate_generator.h"
#include "rtc_base/gunit.h"
#include "rtc_base/virtual_socket_server.h"
@@ -76,7 +76,7 @@
}
WrapperPtr CreatePeerConnection(const RTCConfiguration& config) {
- return CreatePeerConnection(config, absl::make_unique<FakeMediaEngine>());
+ return CreatePeerConnection(config, std::make_unique<FakeMediaEngine>());
}
WrapperPtr CreatePeerConnection(
@@ -101,17 +101,17 @@
factory_dependencies.media_engine = std::move(media_engine);
factory_dependencies.call_factory = CreateCallFactory();
factory_dependencies.event_log_factory =
- absl::make_unique<RtcEventLogFactory>(
+ std::make_unique<RtcEventLogFactory>(
factory_dependencies.task_queue_factory.get());
factory_dependencies.media_transport_factory =
- absl::make_unique<FakeMediaTransportFactory>();
+ std::make_unique<FakeMediaTransportFactory>();
auto pc_factory =
CreateModularPeerConnectionFactory(std::move(factory_dependencies));
- auto fake_port_allocator = absl::make_unique<cricket::FakePortAllocator>(
+ auto fake_port_allocator = std::make_unique<cricket::FakePortAllocator>(
rtc::Thread::Current(), nullptr);
- auto observer = absl::make_unique<MockPeerConnectionObserver>();
+ auto observer = std::make_unique<MockPeerConnectionObserver>();
auto modified_config = config;
modified_config.sdp_semantics = sdp_semantics_;
auto pc = pc_factory->CreatePeerConnection(modified_config,
@@ -122,7 +122,7 @@
}
observer->SetPeerConnectionInterface(pc.get());
- auto wrapper = absl::make_unique<PeerConnectionWrapperForMediaTest>(
+ auto wrapper = std::make_unique<PeerConnectionWrapperForMediaTest>(
pc_factory, pc, std::move(observer));
wrapper->set_media_engine(media_engine_ptr);
return wrapper;
@@ -530,7 +530,7 @@
fake_codecs.push_back(cricket::VideoCodec(113, cricket::kVp9CodecName));
fake_codecs.push_back(cricket::VideoCodec(114, cricket::kH264CodecName));
fake_codecs.push_back(cricket::VideoCodec(115, "HEVC"));
- auto caller_fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto caller_fake_engine = std::make_unique<FakeMediaEngine>();
caller_fake_engine->SetVideoCodecs(fake_codecs);
auto caller = CreatePeerConnectionWithVideo(std::move(caller_fake_engine));
@@ -552,9 +552,9 @@
fake_codecs.push_back(cricket::VideoCodec(113, cricket::kVp9CodecName));
fake_codecs.push_back(cricket::VideoCodec(114, cricket::kH264CodecName));
fake_codecs.push_back(cricket::VideoCodec(115, "HEVC"));
- auto caller_fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto caller_fake_engine = std::make_unique<FakeMediaEngine>();
caller_fake_engine->SetVideoCodecs(fake_codecs);
- auto callee_fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto callee_fake_engine = std::make_unique<FakeMediaEngine>();
callee_fake_engine->SetVideoCodecs(fake_codecs);
RTCOfferAnswerOptions options;
@@ -595,9 +595,9 @@
fake_codecs.push_back(cricket::VideoCodec(113, cricket::kVp9CodecName));
fake_codecs.push_back(cricket::VideoCodec(114, cricket::kH264CodecName));
fake_codecs.push_back(cricket::VideoCodec(115, "HEVC"));
- auto caller_fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto caller_fake_engine = std::make_unique<FakeMediaEngine>();
caller_fake_engine->SetVideoCodecs(fake_codecs);
- auto callee_fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto callee_fake_engine = std::make_unique<FakeMediaEngine>();
callee_fake_engine->SetVideoCodecs(fake_codecs);
RTCOfferAnswerOptions caller_options;
@@ -1398,7 +1398,7 @@
TEST_F(PeerConnectionMediaTestUnifiedPlan,
SetCodecPreferencesAudioMissingRecvCodec) {
- auto fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto fake_engine = std::make_unique<FakeMediaEngine>();
auto send_codecs = fake_engine->voice().send_codecs();
send_codecs.push_back(cricket::AudioCodec(send_codecs.back().id + 1,
"send_only_codec", 0, 0, 1));
@@ -1422,7 +1422,7 @@
TEST_F(PeerConnectionMediaTestUnifiedPlan,
SetCodecPreferencesAudioMissingSendCodec) {
- auto fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto fake_engine = std::make_unique<FakeMediaEngine>();
auto recv_codecs = fake_engine->voice().recv_codecs();
recv_codecs.push_back(cricket::AudioCodec(recv_codecs.back().id + 1,
"recv_only_codec", 0, 0, 1));
@@ -1463,7 +1463,7 @@
TEST_F(PeerConnectionMediaTestUnifiedPlan,
SetCodecPreferencesAudioRejectsOnlyRtxRedFec) {
- auto fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto fake_engine = std::make_unique<FakeMediaEngine>();
auto audio_codecs = fake_engine->voice().send_codecs();
audio_codecs.push_back(cricket::AudioCodec(audio_codecs.back().id + 1,
cricket::kRtxCodecName, 0, 0, 1));
@@ -1560,7 +1560,7 @@
TEST_F(PeerConnectionMediaTestUnifiedPlan,
SetCodecPreferencesVideoRejectsOnlyRtxRedFec) {
- auto fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto fake_engine = std::make_unique<FakeMediaEngine>();
auto video_codecs = fake_engine->video().codecs();
video_codecs.push_back(
cricket::VideoCodec(video_codecs.back().id + 1, cricket::kRtxCodecName));
@@ -1666,7 +1666,7 @@
}
TEST_F(PeerConnectionMediaTestUnifiedPlan, SetCodecPreferencesVideoWithRtx) {
- auto caller_fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto caller_fake_engine = std::make_unique<FakeMediaEngine>();
auto caller_video_codecs = caller_fake_engine->video().codecs();
caller_video_codecs.push_back(cricket::VideoCodec(
caller_video_codecs.back().id + 1, cricket::kVp8CodecName));
@@ -1718,7 +1718,7 @@
TEST_F(PeerConnectionMediaTestUnifiedPlan,
SetCodecPreferencesVideoCodecsNegotiation) {
- auto caller_fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto caller_fake_engine = std::make_unique<FakeMediaEngine>();
auto caller_video_codecs = caller_fake_engine->video().codecs();
caller_video_codecs.push_back(cricket::VideoCodec(
caller_video_codecs.back().id + 1, cricket::kVp8CodecName));
@@ -1734,7 +1734,7 @@
std::to_string(caller_video_codecs.back().id - 1);
caller_fake_engine->SetVideoCodecs(caller_video_codecs);
- auto callee_fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto callee_fake_engine = std::make_unique<FakeMediaEngine>();
callee_fake_engine->SetVideoCodecs(caller_video_codecs);
auto caller = CreatePeerConnectionWithVideo(std::move(caller_fake_engine));
@@ -1792,7 +1792,7 @@
TEST_F(PeerConnectionMediaTestUnifiedPlan,
SetCodecPreferencesVideoCodecsNegotiationReverseOrder) {
- auto caller_fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto caller_fake_engine = std::make_unique<FakeMediaEngine>();
auto caller_video_codecs = caller_fake_engine->video().codecs();
caller_video_codecs.push_back(cricket::VideoCodec(
caller_video_codecs.back().id + 1, cricket::kVp8CodecName));
@@ -1808,7 +1808,7 @@
std::to_string(caller_video_codecs.back().id - 1);
caller_fake_engine->SetVideoCodecs(caller_video_codecs);
- auto callee_fake_engine = absl::make_unique<FakeMediaEngine>();
+ auto callee_fake_engine = std::make_unique<FakeMediaEngine>();
callee_fake_engine->SetVideoCodecs(caller_video_codecs);
auto caller = CreatePeerConnectionWithVideo(std::move(caller_fake_engine));
diff --git a/pc/peer_connection_rampup_tests.cc b/pc/peer_connection_rampup_tests.cc
index dd769e6..b50489d 100644
--- a/pc/peer_connection_rampup_tests.cc
+++ b/pc/peer_connection_rampup_tests.cc
@@ -13,7 +13,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "absl/types/optional.h"
#include "api/audio/audio_mixer.h"
#include "api/audio_codecs/audio_decoder_factory.h"
@@ -183,7 +182,7 @@
fake_network_manager->AddInterface(kDefaultLocalAddress);
fake_network_managers_.emplace_back(fake_network_manager);
- auto observer = absl::make_unique<MockPeerConnectionObserver>();
+ auto observer = std::make_unique<MockPeerConnectionObserver>();
webrtc::PeerConnectionDependencies dependencies(observer.get());
cricket::BasicPortAllocator* port_allocator =
new cricket::BasicPortAllocator(fake_network_manager);
@@ -191,7 +190,7 @@
dependencies.allocator =
std::unique_ptr<cricket::BasicPortAllocator>(port_allocator);
dependencies.tls_cert_verifier =
- absl::make_unique<rtc::TestCertificateVerifier>();
+ std::make_unique<rtc::TestCertificateVerifier>();
auto pc =
pc_factory_->CreatePeerConnection(config, std::move(dependencies));
@@ -199,7 +198,7 @@
return nullptr;
}
- return absl::make_unique<PeerConnectionWrapperForRampUpTest>(
+ return std::make_unique<PeerConnectionWrapperForRampUpTest>(
pc_factory_, pc, std::move(observer));
}
@@ -241,7 +240,7 @@
kTurnInternalAddress, kTurnInternalPort};
static const rtc::SocketAddress turn_server_external_address{
kTurnExternalAddress, kTurnExternalPort};
- return absl::make_unique<cricket::TestTurnServer>(
+ return std::make_unique<cricket::TestTurnServer>(
thread, turn_server_internal_address,
turn_server_external_address, type,
true /*ignore_bad_certs=*/, common_name);
diff --git a/pc/peer_connection_rtp_unittest.cc b/pc/peer_connection_rtp_unittest.cc
index 67aa98d..b709992 100644
--- a/pc/peer_connection_rtp_unittest.cc
+++ b/pc/peer_connection_rtp_unittest.cc
@@ -15,7 +15,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "absl/types/optional.h"
#include "api/audio/audio_mixer.h"
#include "api/audio_codecs/audio_decoder_factory.h"
@@ -138,13 +137,13 @@
// adjustment.
std::unique_ptr<PeerConnectionWrapper> CreatePeerConnectionInternal(
const RTCConfiguration& config) {
- auto observer = absl::make_unique<MockPeerConnectionObserver>();
+ auto observer = std::make_unique<MockPeerConnectionObserver>();
auto pc = pc_factory_->CreatePeerConnection(config, nullptr, nullptr,
observer.get());
EXPECT_TRUE(pc.get());
observer->SetPeerConnectionInterface(pc.get());
- return absl::make_unique<PeerConnectionWrapper>(pc_factory_, pc,
- std::move(observer));
+ return std::make_unique<PeerConnectionWrapper>(pc_factory_, pc,
+ std::move(observer));
}
};
diff --git a/pc/peer_connection_signaling_unittest.cc b/pc/peer_connection_signaling_unittest.cc
index db65de4..9916539 100644
--- a/pc/peer_connection_signaling_unittest.cc
+++ b/pc/peer_connection_signaling_unittest.cc
@@ -11,6 +11,7 @@
// This file contains tests that check the PeerConnection's signaling state
// machine, as well as tests that check basic, media-agnostic aspects of SDP.
+#include <memory>
#include <tuple>
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
@@ -25,7 +26,6 @@
#ifdef WEBRTC_ANDROID
#include "pc/test/android_test_initializer.h"
#endif
-#include "absl/memory/memory.h"
#include "pc/test/fake_audio_capture_module.h"
#include "pc/test/fake_rtc_certificate_generator.h"
#include "rtc_base/gunit.h"
@@ -81,7 +81,7 @@
}
WrapperPtr CreatePeerConnection(const RTCConfiguration& config) {
- auto observer = absl::make_unique<MockPeerConnectionObserver>();
+ auto observer = std::make_unique<MockPeerConnectionObserver>();
RTCConfiguration modified_config = config;
modified_config.sdp_semantics = sdp_semantics_;
auto pc = pc_factory_->CreatePeerConnection(modified_config, nullptr,
@@ -91,7 +91,7 @@
}
observer->SetPeerConnectionInterface(pc.get());
- return absl::make_unique<PeerConnectionWrapperForSignalingTest>(
+ return std::make_unique<PeerConnectionWrapperForSignalingTest>(
pc_factory_, pc, std::move(observer));
}
diff --git a/pc/peer_connection_simulcast_unittest.cc b/pc/peer_connection_simulcast_unittest.cc
index cb36bb1..b8743c6 100644
--- a/pc/peer_connection_simulcast_unittest.cc
+++ b/pc/peer_connection_simulcast_unittest.cc
@@ -8,10 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <memory>
#include <ostream> // no-presubmit-check TODO(webrtc:8982)
#include "absl/algorithm/container.h"
-#include "absl/memory/memory.h"
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "api/create_peerconnection_factory.h"
@@ -116,10 +116,10 @@
}
std::unique_ptr<PeerConnectionWrapper> CreatePeerConnectionWrapper() {
- auto observer = absl::make_unique<MockPeerConnectionObserver>();
+ auto observer = std::make_unique<MockPeerConnectionObserver>();
auto pc = CreatePeerConnection(observer.get());
- return absl::make_unique<PeerConnectionWrapper>(pc_factory_, pc,
- std::move(observer));
+ return std::make_unique<PeerConnectionWrapper>(pc_factory_, pc,
+ std::move(observer));
}
void ExchangeOfferAnswer(PeerConnectionWrapper* local,
diff --git a/pc/remote_audio_source.cc b/pc/remote_audio_source.cc
index 2590f85..d9752f3 100644
--- a/pc/remote_audio_source.cc
+++ b/pc/remote_audio_source.cc
@@ -12,10 +12,10 @@
#include <stddef.h>
+#include <memory>
#include <string>
#include "absl/algorithm/container.h"
-#include "absl/memory/memory.h"
#include "api/scoped_refptr.h"
#include "rtc_base/checks.h"
#include "rtc_base/constructor_magic.h"
@@ -72,7 +72,7 @@
// is destroyed).
worker_thread_->Invoke<void>(RTC_FROM_HERE, [&] {
media_channel->SetRawAudioSink(ssrc,
- absl::make_unique<AudioDataProxy>(this));
+ std::make_unique<AudioDataProxy>(this));
});
}
diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc
index eba54f6..50c49a7 100644
--- a/pc/rtc_stats_collector.cc
+++ b/pc/rtc_stats_collector.cc
@@ -15,7 +15,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "api/candidate.h"
#include "api/media_stream_interface.h"
#include "api/peer_connection_interface.h"
@@ -419,7 +418,7 @@
// RTCStats' timestamp generally refers to when the metric was sampled, but
// for "remote-[outbound/inbound]-rtp" it refers to the local time when the
// Report Block was received.
- auto remote_inbound = absl::make_unique<RTCRemoteInboundRtpStreamStats>(
+ auto remote_inbound = std::make_unique<RTCRemoteInboundRtpStreamStats>(
RTCRemoteInboundRtpStreamStatsIdFromSourceSsrc(media_type,
report_block.source_ssrc),
/*timestamp=*/report_block_data.report_block_timestamp_utc_us());
@@ -1408,7 +1407,7 @@
// create separate media source stats objects on a per-attachment basis.
std::unique_ptr<RTCMediaSourceStats> media_source_stats;
if (track->kind() == MediaStreamTrackInterface::kAudioKind) {
- auto audio_source_stats = absl::make_unique<RTCAudioSourceStats>(
+ auto audio_source_stats = std::make_unique<RTCAudioSourceStats>(
RTCMediaSourceStatsIDFromKindAndAttachment(
cricket::MEDIA_TYPE_AUDIO, sender_internal->AttachmentId()),
timestamp_us);
@@ -1433,7 +1432,7 @@
media_source_stats = std::move(audio_source_stats);
} else {
RTC_DCHECK_EQ(MediaStreamTrackInterface::kVideoKind, track->kind());
- auto video_source_stats = absl::make_unique<RTCVideoSourceStats>(
+ auto video_source_stats = std::make_unique<RTCVideoSourceStats>(
RTCMediaSourceStatsIDFromKindAndAttachment(
cricket::MEDIA_TYPE_VIDEO, sender_internal->AttachmentId()),
timestamp_us);
@@ -1513,7 +1512,7 @@
track_media_info_map.voice_media_info()->receivers) {
if (!voice_receiver_info.connected())
continue;
- auto inbound_audio = absl::make_unique<RTCInboundRTPStreamStats>(
+ auto inbound_audio = std::make_unique<RTCInboundRTPStreamStats>(
RTCInboundRTPStreamStatsIDFromSSRC(true, voice_receiver_info.ssrc()),
timestamp_us);
SetInboundRTPStreamStatsFromVoiceReceiverInfo(mid, voice_receiver_info,
@@ -1535,7 +1534,7 @@
track_media_info_map.voice_media_info()->senders) {
if (!voice_sender_info.connected())
continue;
- auto outbound_audio = absl::make_unique<RTCOutboundRTPStreamStats>(
+ auto outbound_audio = std::make_unique<RTCOutboundRTPStreamStats>(
RTCOutboundRTPStreamStatsIDFromSSRC(true, voice_sender_info.ssrc()),
timestamp_us);
SetOutboundRTPStreamStatsFromVoiceSenderInfo(mid, voice_sender_info,
@@ -1587,7 +1586,7 @@
track_media_info_map.video_media_info()->receivers) {
if (!video_receiver_info.connected())
continue;
- auto inbound_video = absl::make_unique<RTCInboundRTPStreamStats>(
+ auto inbound_video = std::make_unique<RTCInboundRTPStreamStats>(
RTCInboundRTPStreamStatsIDFromSSRC(false, video_receiver_info.ssrc()),
timestamp_us);
SetInboundRTPStreamStatsFromVideoReceiverInfo(mid, video_receiver_info,
@@ -1608,7 +1607,7 @@
track_media_info_map.video_media_info()->senders) {
if (!video_sender_info.connected())
continue;
- auto outbound_video = absl::make_unique<RTCOutboundRTPStreamStats>(
+ auto outbound_video = std::make_unique<RTCOutboundRTPStreamStats>(
RTCOutboundRTPStreamStatsIDFromSSRC(false, video_sender_info.ssrc()),
timestamp_us);
SetOutboundRTPStreamStatsFromVideoSenderInfo(mid, video_sender_info,
@@ -1780,13 +1779,13 @@
RTC_DCHECK(voice_stats.find(voice_channel->media_channel()) ==
voice_stats.end());
voice_stats[voice_channel->media_channel()] =
- absl::make_unique<cricket::VoiceMediaInfo>();
+ std::make_unique<cricket::VoiceMediaInfo>();
} else if (media_type == cricket::MEDIA_TYPE_VIDEO) {
auto* video_channel = static_cast<cricket::VideoChannel*>(channel);
RTC_DCHECK(video_stats.find(video_channel->media_channel()) ==
video_stats.end());
video_stats[video_channel->media_channel()] =
- absl::make_unique<cricket::VideoMediaInfo>();
+ std::make_unique<cricket::VideoMediaInfo>();
} else {
RTC_NOTREACHED();
}
@@ -1836,7 +1835,7 @@
for (const auto& receiver : transceiver->receivers()) {
receivers.push_back(receiver->internal());
}
- stats.track_media_info_map = absl::make_unique<TrackMediaInfoMap>(
+ stats.track_media_info_map = std::make_unique<TrackMediaInfoMap>(
std::move(voice_media_info), std::move(video_media_info), senders,
receivers);
}
diff --git a/pc/rtp_sender_receiver_unittest.cc b/pc/rtp_sender_receiver_unittest.cc
index 02d7452..9026cfc 100644
--- a/pc/rtp_sender_receiver_unittest.cc
+++ b/pc/rtp_sender_receiver_unittest.cc
@@ -109,7 +109,7 @@
// test RtpSenders/RtpReceivers.
media_engine_(new cricket::FakeMediaEngine()),
channel_manager_(absl::WrapUnique(media_engine_),
- absl::make_unique<cricket::RtpDataEngine>(),
+ std::make_unique<cricket::RtpDataEngine>(),
worker_thread_,
network_thread_),
fake_call_(),
@@ -117,7 +117,7 @@
// Create channels to be used by the RtpSenders and RtpReceivers.
channel_manager_.Init();
bool srtp_required = true;
- rtp_dtls_transport_ = absl::make_unique<cricket::FakeDtlsTransport>(
+ rtp_dtls_transport_ = std::make_unique<cricket::FakeDtlsTransport>(
"fake_dtls_transport", cricket::ICE_CANDIDATE_COMPONENT_RTP);
rtp_transport_ = CreateDtlsSrtpTransport();
@@ -163,7 +163,7 @@
}
std::unique_ptr<webrtc::RtpTransportInternal> CreateDtlsSrtpTransport() {
- auto dtls_srtp_transport = absl::make_unique<webrtc::DtlsSrtpTransport>(
+ auto dtls_srtp_transport = std::make_unique<webrtc::DtlsSrtpTransport>(
/*rtcp_mux_required=*/true);
dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport_.get(),
/*rtcp_dtls_transport=*/nullptr);
@@ -196,7 +196,7 @@
audio_track_ = AudioTrack::Create(kAudioTrackId, source);
EXPECT_TRUE(local_stream_->AddTrack(audio_track_));
std::unique_ptr<MockSetStreamsObserver> set_streams_observer =
- absl::make_unique<MockSetStreamsObserver>();
+ std::make_unique<MockSetStreamsObserver>();
audio_rtp_sender_ =
AudioRtpSender::Create(worker_thread_, audio_track_->id(), nullptr,
set_streams_observer.get());
@@ -261,7 +261,7 @@
void CreateVideoRtpSender(bool is_screencast, uint32_t ssrc = kVideoSsrc) {
AddVideoTrack(is_screencast);
std::unique_ptr<MockSetStreamsObserver> set_streams_observer =
- absl::make_unique<MockSetStreamsObserver>();
+ std::make_unique<MockSetStreamsObserver>();
video_rtp_sender_ = VideoRtpSender::Create(
worker_thread_, video_track_->id(), set_streams_observer.get());
ASSERT_TRUE(video_rtp_sender_->SetTrack(video_track_));
@@ -855,7 +855,7 @@
EXPECT_TRUE(local_stream_->AddTrack(audio_track_));
std::unique_ptr<MockSetStreamsObserver> set_streams_observer =
- absl::make_unique<MockSetStreamsObserver>();
+ std::make_unique<MockSetStreamsObserver>();
audio_rtp_sender_ = AudioRtpSender::Create(
worker_thread_, audio_track_->id(), nullptr, set_streams_observer.get());
ASSERT_TRUE(audio_rtp_sender_->SetTrack(audio_track_));
@@ -1086,7 +1086,7 @@
AddVideoTrack(false);
std::unique_ptr<MockSetStreamsObserver> set_streams_observer =
- absl::make_unique<MockSetStreamsObserver>();
+ std::make_unique<MockSetStreamsObserver>();
video_rtp_sender_ = VideoRtpSender::Create(worker_thread_, video_track_->id(),
set_streams_observer.get());
ASSERT_TRUE(video_rtp_sender_->SetTrack(video_track_));
@@ -1127,7 +1127,7 @@
AddVideoTrack(false);
std::unique_ptr<MockSetStreamsObserver> set_streams_observer =
- absl::make_unique<MockSetStreamsObserver>();
+ std::make_unique<MockSetStreamsObserver>();
video_rtp_sender_ = VideoRtpSender::Create(worker_thread_, video_track_->id(),
set_streams_observer.get());
ASSERT_TRUE(video_rtp_sender_->SetTrack(video_track_));
@@ -1555,7 +1555,7 @@
PropagatesVideoTrackContentHintSetBeforeEnabling) {
AddVideoTrack();
std::unique_ptr<MockSetStreamsObserver> set_streams_observer =
- absl::make_unique<MockSetStreamsObserver>();
+ std::make_unique<MockSetStreamsObserver>();
// Setting detailed overrides the default non-screencast mode. This should be
// applied even if the track is set on construction.
video_track_->set_content_hint(VideoTrackInterface::ContentHint::kDetailed);
diff --git a/pc/sctp_transport_unittest.cc b/pc/sctp_transport_unittest.cc
index ca57d6a..8566ef3 100644
--- a/pc/sctp_transport_unittest.cc
+++ b/pc/sctp_transport_unittest.cc
@@ -118,7 +118,7 @@
void AddDtlsTransport() {
std::unique_ptr<cricket::DtlsTransportInternal> cricket_transport =
- absl::make_unique<FakeDtlsTransport>(
+ std::make_unique<FakeDtlsTransport>(
"audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
dtls_transport_ =
new rtc::RefCountedObject<DtlsTransport>(std::move(cricket_transport));
diff --git a/pc/sdp_utils.cc b/pc/sdp_utils.cc
index e6cd07f..5bfdaa4 100644
--- a/pc/sdp_utils.cc
+++ b/pc/sdp_utils.cc
@@ -10,10 +10,10 @@
#include "pc/sdp_utils.h"
+#include <memory>
#include <string>
#include <utility>
-#include "absl/memory/memory.h"
#include "api/jsep_session_description.h"
namespace webrtc {
@@ -28,7 +28,7 @@
const SessionDescriptionInterface* sdesc,
SdpType type) {
RTC_DCHECK(sdesc);
- auto clone = absl::make_unique<JsepSessionDescription>(type);
+ auto clone = std::make_unique<JsepSessionDescription>(type);
clone->Initialize(sdesc->description()->Clone(), sdesc->session_id(),
sdesc->session_version());
// As of writing, our version of GCC does not allow returning a unique_ptr of
diff --git a/pc/session_description_unittest.cc b/pc/session_description_unittest.cc
index 7f2b410..75e0974 100644
--- a/pc/session_description_unittest.cc
+++ b/pc/session_description_unittest.cc
@@ -9,7 +9,8 @@
*/
#include "pc/session_description.h"
-#include "absl/memory/memory.h"
+#include <memory>
+
#include "test/gtest.h"
namespace cricket {
@@ -66,7 +67,7 @@
TEST(SessionDescriptionTest, SetExtmapAllowMixedPropagatesToMediaLevel) {
SessionDescription session_desc;
session_desc.AddContent("video", MediaProtocolType::kRtp,
- absl::make_unique<VideoContentDescription>());
+ std::make_unique<VideoContentDescription>());
MediaContentDescription* video_desc =
session_desc.GetContentDescriptionByName("video");
@@ -107,7 +108,7 @@
SessionDescription session_desc;
session_desc.set_extmap_allow_mixed(false);
std::unique_ptr<MediaContentDescription> audio_desc =
- absl::make_unique<AudioContentDescription>();
+ std::make_unique<AudioContentDescription>();
audio_desc->set_extmap_allow_mixed_enum(MediaContentDescription::kMedia);
// If session setting is false, media level setting is preserved when new
@@ -122,7 +123,7 @@
// content is added.
session_desc.set_extmap_allow_mixed(true);
std::unique_ptr<MediaContentDescription> video_desc =
- absl::make_unique<VideoContentDescription>();
+ std::make_unique<VideoContentDescription>();
session_desc.AddContent("video", MediaProtocolType::kRtp,
std::move(video_desc));
EXPECT_EQ(MediaContentDescription::kSession,
@@ -131,7 +132,7 @@
// Session level setting overrides media level when new content is added.
std::unique_ptr<MediaContentDescription> data_desc =
- absl::make_unique<RtpDataContentDescription>();
+ std::make_unique<RtpDataContentDescription>();
data_desc->set_extmap_allow_mixed_enum(MediaContentDescription::kMedia);
session_desc.AddContent("data", MediaProtocolType::kRtp,
std::move(data_desc));
diff --git a/pc/srtp_transport_unittest.cc b/pc/srtp_transport_unittest.cc
index 403ff7c..fa095bf 100644
--- a/pc/srtp_transport_unittest.cc
+++ b/pc/srtp_transport_unittest.cc
@@ -12,10 +12,10 @@
#include <string.h>
+#include <memory>
#include <set>
#include <vector>
-#include "absl/memory/memory.h"
#include "call/rtp_demuxer.h"
#include "media/base/fake_rtp.h"
#include "p2p/base/dtls_transport_internal.h"
@@ -50,16 +50,16 @@
bool rtcp_mux_enabled = true;
rtp_packet_transport1_ =
- absl::make_unique<rtc::FakePacketTransport>("fake_packet_transport1");
+ std::make_unique<rtc::FakePacketTransport>("fake_packet_transport1");
rtp_packet_transport2_ =
- absl::make_unique<rtc::FakePacketTransport>("fake_packet_transport2");
+ std::make_unique<rtc::FakePacketTransport>("fake_packet_transport2");
bool asymmetric = false;
rtp_packet_transport1_->SetDestination(rtp_packet_transport2_.get(),
asymmetric);
- srtp_transport1_ = absl::make_unique<SrtpTransport>(rtcp_mux_enabled);
- srtp_transport2_ = absl::make_unique<SrtpTransport>(rtcp_mux_enabled);
+ srtp_transport1_ = std::make_unique<SrtpTransport>(rtcp_mux_enabled);
+ srtp_transport2_ = std::make_unique<SrtpTransport>(rtcp_mux_enabled);
srtp_transport1_->SetRtpPacketTransport(rtp_packet_transport1_.get());
srtp_transport2_->SetRtpPacketTransport(rtp_packet_transport2_.get());
diff --git a/pc/stats_collector.cc b/pc/stats_collector.cc
index a65a5e7..1fb2a5b 100644
--- a/pc/stats_collector.cc
+++ b/pc/stats_collector.cc
@@ -15,7 +15,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "pc/channel.h"
#include "pc/peer_connection.h"
#include "rtc_base/checks.h"
@@ -1009,11 +1008,11 @@
cricket::MediaChannel* channel) {
RTC_DCHECK(channel);
if (channel->media_type() == cricket::MEDIA_TYPE_AUDIO) {
- return absl::make_unique<VoiceMediaChannelStatsGatherer>(
+ return std::make_unique<VoiceMediaChannelStatsGatherer>(
static_cast<cricket::VoiceMediaChannel*>(channel));
} else {
RTC_DCHECK_EQ(channel->media_type(), cricket::MEDIA_TYPE_VIDEO);
- return absl::make_unique<VideoMediaChannelStatsGatherer>(
+ return std::make_unique<VideoMediaChannelStatsGatherer>(
static_cast<cricket::VideoMediaChannel*>(channel));
}
}
diff --git a/pc/stats_collector_unittest.cc b/pc/stats_collector_unittest.cc
index 858e7b6..a06b322 100644
--- a/pc/stats_collector_unittest.cc
+++ b/pc/stats_collector_unittest.cc
@@ -15,7 +15,6 @@
#include <memory>
#include "absl/algorithm/container.h"
-#include "absl/memory/memory.h"
#include "absl/types/optional.h"
#include "api/audio_codecs/audio_encoder.h"
#include "api/candidate.h"
@@ -600,7 +599,7 @@
std::unique_ptr<StatsCollectorForTest> CreateStatsCollector(
PeerConnectionInternal* pc) {
- return absl::make_unique<StatsCollectorForTest>(pc);
+ return std::make_unique<StatsCollectorForTest>(pc);
}
void VerifyAudioTrackStats(FakeAudioTrack* audio_track,
diff --git a/pc/test/fake_peer_connection_for_stats.h b/pc/test/fake_peer_connection_for_stats.h
index 8264391..c639158 100644
--- a/pc/test/fake_peer_connection_for_stats.h
+++ b/pc/test/fake_peer_connection_for_stats.h
@@ -18,7 +18,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "media/base/fake_media_engine.h"
#include "pc/stream_collection.h"
#include "pc/test/fake_data_channel_provider.h"
@@ -138,9 +137,9 @@
const std::string& transport_name) {
RTC_DCHECK(!voice_channel_);
auto voice_media_channel =
- absl::make_unique<FakeVoiceMediaChannelForStats>();
+ std::make_unique<FakeVoiceMediaChannelForStats>();
auto* voice_media_channel_ptr = voice_media_channel.get();
- voice_channel_ = absl::make_unique<cricket::VoiceChannel>(
+ voice_channel_ = std::make_unique<cricket::VoiceChannel>(
worker_thread_, network_thread_, signaling_thread_,
std::move(voice_media_channel), mid, kDefaultSrtpRequired,
webrtc::CryptoOptions(), &ssrc_generator_);
@@ -156,9 +155,9 @@
const std::string& transport_name) {
RTC_DCHECK(!video_channel_);
auto video_media_channel =
- absl::make_unique<FakeVideoMediaChannelForStats>();
+ std::make_unique<FakeVideoMediaChannelForStats>();
auto video_media_channel_ptr = video_media_channel.get();
- video_channel_ = absl::make_unique<cricket::VideoChannel>(
+ video_channel_ = std::make_unique<cricket::VideoChannel>(
worker_thread_, network_thread_, signaling_thread_,
std::move(video_media_channel), mid, kDefaultSrtpRequired,
webrtc::CryptoOptions(), &ssrc_generator_);
diff --git a/pc/test/fake_periodic_video_source.h b/pc/test/fake_periodic_video_source.h
index 7575f97..80dff70 100644
--- a/pc/test/fake_periodic_video_source.h
+++ b/pc/test/fake_periodic_video_source.h
@@ -13,7 +13,6 @@
#include <memory>
-#include "absl/memory/memory.h"
#include "api/video/video_source_interface.h"
#include "media/base/fake_frame_source.h"
#include "media/base/video_broadcaster.h"
@@ -44,7 +43,7 @@
config.height,
config.frame_interval_ms * rtc::kNumMicrosecsPerMillisec,
config.timestamp_offset_ms * rtc::kNumMicrosecsPerMillisec),
- task_queue_(absl::make_unique<TaskQueueForTest>(
+ task_queue_(std::make_unique<TaskQueueForTest>(
"FakePeriodicVideoTrackSource")) {
thread_checker_.Detach();
frame_source_.SetRotation(config.rotation);
diff --git a/pc/test/frame_generator_capturer_video_track_source.h b/pc/test/frame_generator_capturer_video_track_source.h
index 007cfc2..c0648ba 100644
--- a/pc/test/frame_generator_capturer_video_track_source.h
+++ b/pc/test/frame_generator_capturer_video_track_source.h
@@ -14,7 +14,6 @@
#include <memory>
#include <utility>
-#include "absl/memory/memory.h"
#include "api/task_queue/default_task_queue_factory.h"
#include "api/task_queue/task_queue_factory.h"
#include "pc/video_track_source.h"
@@ -46,7 +45,7 @@
: VideoTrackSource(false /* remote */),
task_queue_factory_(CreateDefaultTaskQueueFactory()),
is_screencast_(is_screencast) {
- video_capturer_ = absl::make_unique<test::FrameGeneratorCapturer>(
+ video_capturer_ = std::make_unique<test::FrameGeneratorCapturer>(
clock,
test::FrameGenerator::CreateSquareGenerator(
config.width, config.height, absl::nullopt,
diff --git a/pc/test/mock_peer_connection_observers.h b/pc/test/mock_peer_connection_observers.h
index eeac9b0..5a388bd 100644
--- a/pc/test/mock_peer_connection_observers.h
+++ b/pc/test/mock_peer_connection_observers.h
@@ -20,7 +20,6 @@
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "api/data_channel_interface.h"
#include "api/jsep_ice_candidate.h"
#include "pc/stream_collection.h"
@@ -116,7 +115,7 @@
RTC_DCHECK(pc_);
RTC_DCHECK(PeerConnectionInterface::kIceGatheringNew !=
pc_->ice_gathering_state());
- candidates_.push_back(absl::make_unique<JsepIceCandidate>(
+ candidates_.push_back(std::make_unique<JsepIceCandidate>(
candidate->sdp_mid(), candidate->sdp_mline_index(),
candidate->candidate()));
callback_triggered_ = true;
diff --git a/pc/test/peer_connection_test_wrapper.cc b/pc/test/peer_connection_test_wrapper.cc
index 7b278c8..4f0d72e 100644
--- a/pc/test/peer_connection_test_wrapper.cc
+++ b/pc/test/peer_connection_test_wrapper.cc
@@ -12,11 +12,11 @@
#include <stddef.h>
+#include <memory>
#include <string>
#include <utility>
#include <vector>
-#include "absl/memory/memory.h"
#include "absl/types/optional.h"
#include "api/audio/audio_mixer.h"
#include "api/create_peerconnection_factory.h"
@@ -142,7 +142,7 @@
if (receiver->track()->kind() == MediaStreamTrackInterface::kVideoKind) {
auto* video_track =
static_cast<VideoTrackInterface*>(receiver->track().get());
- renderer_ = absl::make_unique<FakeVideoTrackRenderer>(video_track);
+ renderer_ = std::make_unique<FakeVideoTrackRenderer>(video_track);
}
}
diff --git a/pc/webrtc_sdp.cc b/pc/webrtc_sdp.cc
index 7fefa40..ad8fb7e 100644
--- a/pc/webrtc_sdp.cc
+++ b/pc/webrtc_sdp.cc
@@ -24,7 +24,6 @@
#include <vector>
#include "absl/algorithm/container.h"
-#include "absl/memory/memory.h"
#include "absl/strings/match.h"
#include "api/candidate.h"
#include "api/crypto_params.h"
@@ -987,7 +986,7 @@
TransportDescription session_td("", "");
RtpHeaderExtensions session_extmaps;
rtc::SocketAddress session_connection_addr;
- auto desc = absl::make_unique<cricket::SessionDescription>();
+ auto desc = std::make_unique<cricket::SessionDescription>();
size_t current_pos = 0;
// Session Description
@@ -2658,7 +2657,7 @@
TransportDescription* transport,
std::vector<std::unique_ptr<JsepIceCandidate>>* candidates,
webrtc::SdpParseError* error) {
- auto media_desc = absl::make_unique<C>();
+ auto media_desc = std::make_unique<C>();
if (!ParseContent(message, media_type, mline_index, protocol, payload_types,
pos, content_name, bundle_only, msid_signaling,
media_desc.get(), transport, candidates, error)) {
@@ -2771,7 +2770,7 @@
// The draft-26 format is:
// m=application <port> UDP/DTLS/SCTP webrtc-datachannel
// use_sctpmap should be false.
- auto data_desc = absl::make_unique<SctpDataContentDescription>();
+ auto data_desc = std::make_unique<SctpDataContentDescription>();
// Default max message size is 64K
// according to draft-ietf-mmusic-sctp-sdp-26
data_desc->set_max_message_size(kDefaultSctpMaxMessageSize);
@@ -3457,7 +3456,7 @@
RTC_DCHECK(candidate.password().empty());
candidate.set_password(transport->ice_pwd);
candidates->push_back(
- absl::make_unique<JsepIceCandidate>(mline_id, mline_index, candidate));
+ std::make_unique<JsepIceCandidate>(mline_id, mline_index, candidate));
}
return true;
diff --git a/pc/webrtc_sdp_unittest.cc b/pc/webrtc_sdp_unittest.cc
index 3a105b8..a6182c5 100644
--- a/pc/webrtc_sdp_unittest.cc
+++ b/pc/webrtc_sdp_unittest.cc
@@ -4691,7 +4691,7 @@
}
TEST_F(WebRtcSdpTest, SerializeMediaTransportSettings) {
- auto description = absl::make_unique<cricket::SessionDescription>();
+ auto description = std::make_unique<cricket::SessionDescription>();
JsepSessionDescription output(SdpType::kOffer);
// JsepSessionDescription takes ownership of the description.
diff --git a/pc/webrtc_session_description_factory.cc b/pc/webrtc_session_description_factory.cc
index 4cf1c8c..aaef7fd 100644
--- a/pc/webrtc_session_description_factory.cc
+++ b/pc/webrtc_session_description_factory.cc
@@ -12,12 +12,12 @@
#include <stddef.h>
+#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/algorithm/container.h"
-#include "absl/memory/memory.h"
#include "absl/types/optional.h"
#include "api/jsep.h"
#include "api/jsep_session_description.h"
@@ -357,7 +357,7 @@
// is created regardless if it's identical to the previous one or not.
// The |session_version_| is a uint64_t, the wrap around should not happen.
RTC_DCHECK(session_version_ + 1 > session_version_);
- auto offer = absl::make_unique<JsepSessionDescription>(
+ auto offer = std::make_unique<JsepSessionDescription>(
SdpType::kOffer, std::move(desc), session_id_,
rtc::ToString(session_version_++));
if (pc_->local_description()) {
@@ -413,7 +413,7 @@
// Get a new version number by increasing the |session_version_answer_|.
// The |session_version_| is a uint64_t, the wrap around should not happen.
RTC_DCHECK(session_version_ + 1 > session_version_);
- auto answer = absl::make_unique<JsepSessionDescription>(
+ auto answer = std::make_unique<JsepSessionDescription>(
SdpType::kAnswer, std::move(desc), session_id_,
rtc::ToString(session_version_++));
if (pc_->local_description()) {