Use absl::make_unique and absl::WrapUnique directly

Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
diff --git a/pc/BUILD.gn b/pc/BUILD.gn
index a3ca3ce..195d185 100644
--- a/pc/BUILD.gn
+++ b/pc/BUILD.gn
@@ -85,6 +85,7 @@
     "../rtc_base:rtc_task_queue",
     "../rtc_base:stringutils",
     "../system_wrappers:metrics_api",
+    "//third_party/abseil-cpp/absl/memory",
     "//third_party/abseil-cpp/absl/types:optional",
   ]
 
@@ -205,6 +206,7 @@
     "../stats",
     "../system_wrappers",
     "../system_wrappers:field_trial_api",
+    "//third_party/abseil-cpp/absl/memory",
     "//third_party/abseil-cpp/absl/types:optional",
   ]
 }
@@ -311,6 +313,7 @@
       "../system_wrappers:metrics_default",
       "../system_wrappers:runtime_enabled_features_default",
       "../test:test_support",
+      "//third_party/abseil-cpp/absl/memory",
     ]
 
     if (rtc_build_libsrtp) {
@@ -348,6 +351,7 @@
       "../rtc_base:rtc_base_tests_utils",
       "../test:perf_test",
       "../test:test_support",
+      "//third_party/abseil-cpp/absl/memory",
     ]
     if (!build_with_chromium && is_clang) {
       # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
@@ -408,6 +412,7 @@
       "../rtc_base:rtc_task_queue",
       "../test:test_support",
       "../test:video_test_common",
+      "//third_party/abseil-cpp/absl/memory",
     ]
 
     if (!build_with_chromium && is_clang) {
@@ -478,6 +483,7 @@
       "../rtc_base:checks",
       "../rtc_base:stringutils",
       "../test:fileutils",
+      "//third_party/abseil-cpp/absl/memory",
     ]
     if (is_android) {
       deps += [ ":android_black_magic" ]
diff --git a/pc/channel.cc b/pc/channel.cc
index 713cd39..cb3672a 100644
--- a/pc/channel.cc
+++ b/pc/channel.cc
@@ -14,6 +14,7 @@
 
 #include "pc/channel.h"
 
+#include "absl/memory/memory.h"
 #include "api/call/audio_sink.h"
 #include "media/base/mediaconstants.h"
 #include "media/base/rtputils.h"
@@ -25,7 +26,6 @@
 #include "rtc_base/dscp.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/networkroute.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/trace_event.h"
 // Adding 'nogncheck' to disable the gn include headers check to support modular
 // WebRTC build targets.
diff --git a/pc/channel_unittest.cc b/pc/channel_unittest.cc
index 29d2bd7..9a28143 100644
--- a/pc/channel_unittest.cc
+++ b/pc/channel_unittest.cc
@@ -117,9 +117,9 @@
   }
 
   void CreateChannels(int flags1, int flags2) {
-    CreateChannels(rtc::MakeUnique<typename T::MediaChannel>(
+    CreateChannels(absl::make_unique<typename T::MediaChannel>(
                        nullptr, typename T::Options()),
-                   rtc::MakeUnique<typename T::MediaChannel>(
+                   absl::make_unique<typename T::MediaChannel>(
                        nullptr, typename T::Options()),
                    flags1, flags2);
   }
@@ -248,7 +248,7 @@
       webrtc::RtpTransportInternal* rtp_transport,
       int flags) {
     rtc::Thread* signaling_thread = rtc::Thread::Current();
-    auto channel = rtc::MakeUnique<typename T::Channel>(
+    auto channel = absl::make_unique<typename T::Channel>(
         worker_thread, network_thread, signaling_thread, engine, std::move(ch),
         cricket::CN_AUDIO, (flags & DTLS) != 0, rtc::CryptoOptions());
     channel->Init_w(rtp_transport);
@@ -282,8 +282,8 @@
   std::unique_ptr<webrtc::RtpTransport> CreateUnencryptedTransport(
       rtc::PacketTransportInternal* rtp_packet_transport,
       rtc::PacketTransportInternal* rtcp_packet_transport) {
-    auto rtp_transport =
-        rtc::MakeUnique<webrtc::RtpTransport>(rtcp_packet_transport == nullptr);
+    auto rtp_transport = absl::make_unique<webrtc::RtpTransport>(
+        rtcp_packet_transport == nullptr);
 
     rtp_transport->SetRtpPacketTransport(rtp_packet_transport);
     if (rtcp_packet_transport) {
@@ -295,7 +295,7 @@
   std::unique_ptr<webrtc::DtlsSrtpTransport> CreateDtlsSrtpTransport(
       cricket::DtlsTransportInternal* rtp_dtls_transport,
       cricket::DtlsTransportInternal* rtcp_dtls_transport) {
-    auto dtls_srtp_transport = rtc::MakeUnique<webrtc::DtlsSrtpTransport>(
+    auto dtls_srtp_transport = absl::make_unique<webrtc::DtlsSrtpTransport>(
         rtcp_dtls_transport == nullptr);
 
     dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport,
@@ -927,8 +927,9 @@
         T::MediaChannel::SendRtcp(kRtcpReport, sizeof(kRtcpReport));
       }
     };
-    CreateChannels(rtc::MakeUnique<LastWordMediaChannel>(),
-                   rtc::MakeUnique<LastWordMediaChannel>(), RTCP_MUX, RTCP_MUX);
+    CreateChannels(absl::make_unique<LastWordMediaChannel>(),
+                   absl::make_unique<LastWordMediaChannel>(), RTCP_MUX,
+                   RTCP_MUX);
     EXPECT_TRUE(SendInitiate());
     EXPECT_TRUE(SendAccept());
     EXPECT_TRUE(Terminate());
@@ -1539,7 +1540,7 @@
     webrtc::RtpTransportInternal* rtp_transport,
     int flags) {
   rtc::Thread* signaling_thread = rtc::Thread::Current();
-  auto channel = rtc::MakeUnique<cricket::VideoChannel>(
+  auto channel = absl::make_unique<cricket::VideoChannel>(
       worker_thread, network_thread, signaling_thread, std::move(ch),
       cricket::CN_VIDEO, (flags & DTLS) != 0, rtc::CryptoOptions());
   channel->Init_w(rtp_transport);
@@ -2158,7 +2159,7 @@
     webrtc::RtpTransportInternal* rtp_transport,
     int flags) {
   rtc::Thread* signaling_thread = rtc::Thread::Current();
-  auto channel = rtc::MakeUnique<cricket::RtpDataChannel>(
+  auto channel = absl::make_unique<cricket::RtpDataChannel>(
       worker_thread, network_thread, signaling_thread, std::move(ch),
       cricket::CN_DATA, (flags & DTLS) != 0, rtc::CryptoOptions());
   channel->Init_w(rtp_transport);
diff --git a/pc/channelmanager.cc b/pc/channelmanager.cc
index ac97ea8..dab622a 100644
--- a/pc/channelmanager.cc
+++ b/pc/channelmanager.cc
@@ -13,10 +13,10 @@
 #include <algorithm>
 #include <utility>
 
+#include "absl/memory/memory.h"
 #include "media/base/rtpdataengine.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/logging.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/stringutils.h"
 #include "rtc_base/trace_event.h"
 
@@ -182,9 +182,9 @@
     return nullptr;
   }
 
-  auto voice_channel = rtc::MakeUnique<VoiceChannel>(
+  auto voice_channel = absl::make_unique<VoiceChannel>(
       worker_thread_, network_thread_, signaling_thread, media_engine_.get(),
-      rtc::WrapUnique(media_channel), content_name, srtp_required,
+      absl::WrapUnique(media_channel), content_name, srtp_required,
       crypto_options);
 
   voice_channel->Init_w(rtp_transport);
@@ -249,9 +249,9 @@
     return nullptr;
   }
 
-  auto video_channel = rtc::MakeUnique<VideoChannel>(
+  auto video_channel = absl::make_unique<VideoChannel>(
       worker_thread_, network_thread_, signaling_thread,
-      rtc::WrapUnique(media_channel), content_name, srtp_required,
+      absl::WrapUnique(media_channel), content_name, srtp_required,
       crypto_options);
   video_channel->Init_w(rtp_transport);
 
@@ -307,9 +307,9 @@
     return nullptr;
   }
 
-  auto data_channel = rtc::MakeUnique<RtpDataChannel>(
+  auto data_channel = absl::make_unique<RtpDataChannel>(
       worker_thread_, network_thread_, signaling_thread,
-      rtc::WrapUnique(media_channel), content_name, srtp_required,
+      absl::WrapUnique(media_channel), content_name, srtp_required,
       crypto_options);
   data_channel->Init_w(rtp_transport);
 
diff --git a/pc/channelmanager_unittest.cc b/pc/channelmanager_unittest.cc
index 3699c5b..47c9530 100644
--- a/pc/channelmanager_unittest.cc
+++ b/pc/channelmanager_unittest.cc
@@ -52,10 +52,10 @@
   }
 
   std::unique_ptr<webrtc::RtpTransportInternal> CreateDtlsSrtpTransport() {
-    rtp_dtls_transport_ = rtc::MakeUnique<FakeDtlsTransport>(
+    rtp_dtls_transport_ = absl::make_unique<FakeDtlsTransport>(
         "fake_dtls_transport", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-    auto dtls_srtp_transport =
-        rtc::MakeUnique<webrtc::DtlsSrtpTransport>(/*rtcp_mux_required=*/true);
+    auto dtls_srtp_transport = absl::make_unique<webrtc::DtlsSrtpTransport>(
+        /*rtcp_mux_required=*/true);
     dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport_.get(),
                                            /*rtcp_dtls_transport=*/nullptr);
     return dtls_srtp_transport;
diff --git a/pc/dtlssrtptransport_unittest.cc b/pc/dtlssrtptransport_unittest.cc
index cfe817f..2012c49 100644
--- a/pc/dtlssrtptransport_unittest.cc
+++ b/pc/dtlssrtptransport_unittest.cc
@@ -13,6 +13,7 @@
 #include <memory>
 #include <utility>
 
+#include "absl/memory/memory.h"
 #include "media/base/fakertp.h"
 #include "p2p/base/dtlstransportinternal.h"
 #include "p2p/base/fakedtlstransport.h"
@@ -22,7 +23,6 @@
 #include "pc/rtptransporttestutil.h"
 #include "rtc_base/asyncpacketsocket.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/sslstreamadapter.h"
 
 using cricket::FakeDtlsTransport;
@@ -52,7 +52,7 @@
       FakeDtlsTransport* rtcp_dtls,
       bool rtcp_mux_enabled) {
     auto dtls_srtp_transport =
-        rtc::MakeUnique<DtlsSrtpTransport>(rtcp_mux_enabled);
+        absl::make_unique<DtlsSrtpTransport>(rtcp_mux_enabled);
 
     dtls_srtp_transport->SetDtlsTransports(rtp_dtls, rtcp_dtls);
 
@@ -254,17 +254,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 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "video", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls2 = absl::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 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls3 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtp_dtls4 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls4 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
 
   CompleteDtlsHandshake(rtp_dtls3.get(), rtp_dtls4.get());
@@ -279,25 +279,25 @@
 // RTP and RTCP transports finished the handshake, SRTP is set up.
 TEST_F(DtlsSrtpTransportTest,
        SetTransportsAfterHandshakeCompleteWithoutRtcpMux) {
-  auto rtp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "video", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "video", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
-  auto rtp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "video", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls2 = absl::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 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls3 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls3 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls3 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
-  auto rtp_dtls4 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls4 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls4 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls4 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
   CompleteDtlsHandshake(rtp_dtls3.get(), rtp_dtls4.get());
   CompleteDtlsHandshake(rtcp_dtls3.get(), rtcp_dtls4.get());
@@ -311,13 +311,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 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
-  auto rtp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
 
   MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
@@ -334,13 +334,13 @@
 // RTCP DTLS handshake are finished.
 TEST_F(DtlsSrtpTransportTest,
        SetTransportsBeforeHandshakeCompleteWithoutRtcpMux) {
-  auto rtp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
-  auto rtp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
 
   MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
@@ -357,9 +357,9 @@
 // context will be reset and will be re-setup once the new transports' handshake
 // complete.
 TEST_F(DtlsSrtpTransportTest, DtlsSrtpResetAfterDtlsTransportChange) {
-  auto rtp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
 
   MakeDtlsSrtpTransports(rtp_dtls1.get(), nullptr, rtp_dtls2.get(), nullptr,
@@ -369,9 +369,9 @@
   EXPECT_TRUE(dtls_srtp_transport1_->IsSrtpActive());
   EXPECT_TRUE(dtls_srtp_transport2_->IsSrtpActive());
 
-  auto rtp_dtls3 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls3 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtp_dtls4 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls4 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
 
   // The previous context is reset.
@@ -389,13 +389,13 @@
 // enabled, SRTP is set up.
 TEST_F(DtlsSrtpTransportTest,
        RtcpMuxEnabledAfterRtpTransportHandshakeComplete) {
-  auto rtp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
-  auto rtp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
 
   MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
@@ -416,9 +416,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 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
 
   MakeDtlsSrtpTransports(rtp_dtls1.get(), nullptr, rtp_dtls2.get(), nullptr,
@@ -442,9 +442,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 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
 
   MakeDtlsSrtpTransports(rtp_dtls1.get(), nullptr, rtp_dtls2.get(), nullptr,
@@ -458,13 +458,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 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
-  auto rtp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
 
   MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
@@ -485,13 +485,13 @@
 // when attempting to unprotect packets.
 // Regression test for bugs.webrtc.org/8996
 TEST_F(DtlsSrtpTransportTest, SrtpSessionNotResetWhenRtcpTransportRemoved) {
-  auto rtp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
-  auto rtp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
 
   MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
@@ -514,13 +514,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 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls1 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls1 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
-  auto rtp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP);
-  auto rtcp_dtls2 = rtc::MakeUnique<FakeDtlsTransport>(
+  auto rtcp_dtls2 = absl::make_unique<FakeDtlsTransport>(
       "audio", cricket::ICE_CANDIDATE_COMPONENT_RTCP);
 
   MakeDtlsSrtpTransports(rtp_dtls1.get(), rtcp_dtls1.get(), rtp_dtls2.get(),
diff --git a/pc/jsepsessiondescription.cc b/pc/jsepsessiondescription.cc
index f52faf1..2adf69d 100644
--- a/pc/jsepsessiondescription.cc
+++ b/pc/jsepsessiondescription.cc
@@ -12,11 +12,11 @@
 
 #include <memory>
 
+#include "absl/memory/memory.h"
 #include "p2p/base/port.h"
 #include "pc/mediasession.h"
 #include "pc/webrtcsdp.h"
 #include "rtc_base/arraysize.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/stringencode.h"
 
 using cricket::SessionDescription;
@@ -160,7 +160,7 @@
     SdpType type,
     const std::string& sdp,
     SdpParseError* error_out) {
-  auto jsep_desc = rtc::MakeUnique<JsepSessionDescription>(type);
+  auto jsep_desc = absl::make_unique<JsepSessionDescription>(type);
   if (!SdpDeserialize(sdp, jsep_desc.get(), error_out)) {
     return nullptr;
   }
diff --git a/pc/jsepsessiondescription_unittest.cc b/pc/jsepsessiondescription_unittest.cc
index 614b23d..d9e2588 100644
--- a/pc/jsepsessiondescription_unittest.cc
+++ b/pc/jsepsessiondescription_unittest.cc
@@ -11,6 +11,7 @@
 #include <memory>
 #include <string>
 
+#include "absl/memory/memory.h"
 #include "api/candidate.h"
 #include "api/jsepicecandidate.h"
 #include "api/jsepsessiondescription.h"
@@ -20,7 +21,6 @@
 #include "pc/sessiondescription.h"
 #include "pc/webrtcsdp.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/stringencode.h"
 
 using cricket::MediaProtocolType;
@@ -83,7 +83,7 @@
     candidate_ = candidate;
     const std::string session_id = rtc::ToString(rtc::CreateRandomId64());
     const std::string session_version = rtc::ToString(rtc::CreateRandomId());
-    jsep_desc_ = rtc::MakeUnique<JsepSessionDescription>(SdpType::kOffer);
+    jsep_desc_ = absl::make_unique<JsepSessionDescription>(SdpType::kOffer);
     ASSERT_TRUE(jsep_desc_->Initialize(CreateCricketSessionDescription(),
                                        session_id, session_version));
   }
@@ -97,7 +97,7 @@
 
   std::unique_ptr<SessionDescriptionInterface> DeSerialize(
       const std::string& sdp) {
-    auto jsep_desc = rtc::MakeUnique<JsepSessionDescription>(SdpType::kOffer);
+    auto jsep_desc = absl::make_unique<JsepSessionDescription>(SdpType::kOffer);
     EXPECT_TRUE(webrtc::SdpDeserialize(sdp, jsep_desc.get(), nullptr));
     return std::move(jsep_desc);
   }
diff --git a/pc/jseptransport.cc b/pc/jseptransport.cc
index bea5d30..c3dfd32 100644
--- a/pc/jseptransport.cc
+++ b/pc/jseptransport.cc
@@ -13,6 +13,7 @@
 #include <memory>
 #include <utility>  // for std::pair
 
+#include "absl/memory/memory.h"
 #include "api/candidate.h"
 #include "p2p/base/p2pconstants.h"
 #include "p2p/base/p2ptransportchannel.h"
@@ -20,7 +21,6 @@
 #include "rtc_base/bind.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/logging.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/strings/string_builder.h"
 
 using webrtc::SdpType;
@@ -490,7 +490,7 @@
   rtc::SSLFingerprint* remote_fp =
       remote_description_->transport_desc.identity_fingerprint.get();
   if (remote_fp && local_fp) {
-    remote_fingerprint = rtc::MakeUnique<rtc::SSLFingerprint>(*remote_fp);
+    remote_fingerprint = absl::make_unique<rtc::SSLFingerprint>(*remote_fp);
     webrtc::RTCError error =
         NegotiateDtlsRole(local_description_type,
                           local_description_->transport_desc.connection_role,
@@ -505,7 +505,7 @@
         "Local fingerprint supplied when caller didn't offer DTLS.");
   } else {
     // We are not doing DTLS
-    remote_fingerprint = rtc::MakeUnique<rtc::SSLFingerprint>("", nullptr, 0);
+    remote_fingerprint = absl::make_unique<rtc::SSLFingerprint>("", nullptr, 0);
   }
   // Now that we have negotiated everything, push it downward.
   // Note that we cache the result so that if we have race conditions
diff --git a/pc/jseptransport_unittest.cc b/pc/jseptransport_unittest.cc
index 16cc526..56a742c 100644
--- a/pc/jseptransport_unittest.cc
+++ b/pc/jseptransport_unittest.cc
@@ -44,7 +44,7 @@
   std::unique_ptr<webrtc::SrtpTransport> CreateSdesTransport(
       rtc::PacketTransportInternal* rtp_packet_transport,
       rtc::PacketTransportInternal* rtcp_packet_transport) {
-    auto srtp_transport = rtc::MakeUnique<webrtc::SrtpTransport>(
+    auto srtp_transport = absl::make_unique<webrtc::SrtpTransport>(
         rtcp_packet_transport == nullptr);
 
     srtp_transport->SetRtpPacketTransport(rtp_packet_transport);
@@ -57,7 +57,7 @@
   std::unique_ptr<webrtc::DtlsSrtpTransport> CreateDtlsSrtpTransport(
       cricket::DtlsTransportInternal* rtp_dtls_transport,
       cricket::DtlsTransportInternal* rtcp_dtls_transport) {
-    auto dtls_srtp_transport = rtc::MakeUnique<webrtc::DtlsSrtpTransport>(
+    auto dtls_srtp_transport = absl::make_unique<webrtc::DtlsSrtpTransport>(
         rtcp_dtls_transport == nullptr);
     dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport,
                                            rtcp_dtls_transport);
@@ -68,16 +68,17 @@
   // FakeIceTransport.
   std::unique_ptr<JsepTransport> CreateJsepTransport2(bool rtcp_mux_enabled,
                                                       SrtpMode srtp_mode) {
-    auto ice = rtc::MakeUnique<FakeIceTransport>(kTransportName,
-                                                 ICE_CANDIDATE_COMPONENT_RTP);
+    auto ice = absl::make_unique<FakeIceTransport>(kTransportName,
+                                                   ICE_CANDIDATE_COMPONENT_RTP);
     auto rtp_dtls_transport =
-        rtc::MakeUnique<FakeDtlsTransport>(std::move(ice));
+        absl::make_unique<FakeDtlsTransport>(std::move(ice));
 
     std::unique_ptr<FakeDtlsTransport> rtcp_dtls_transport;
     if (!rtcp_mux_enabled) {
-      ice = rtc::MakeUnique<FakeIceTransport>(kTransportName,
-                                              ICE_CANDIDATE_COMPONENT_RTCP);
-      rtcp_dtls_transport = rtc::MakeUnique<FakeDtlsTransport>(std::move(ice));
+      ice = absl::make_unique<FakeIceTransport>(kTransportName,
+                                                ICE_CANDIDATE_COMPONENT_RTCP);
+      rtcp_dtls_transport =
+          absl::make_unique<FakeDtlsTransport>(std::move(ice));
     }
 
     std::unique_ptr<webrtc::RtpTransport> unencrypted_rtp_transport;
@@ -97,7 +98,7 @@
         RTC_NOTREACHED();
     }
 
-    auto jsep_transport = rtc::MakeUnique<JsepTransport>(
+    auto jsep_transport = absl::make_unique<JsepTransport>(
         kTransportName, /*local_certificate=*/nullptr,
         std::move(unencrypted_rtp_transport), std::move(sdes_transport),
         std::move(dtls_srtp_transport), std::move(rtp_dtls_transport),
diff --git a/pc/jseptransportcontroller.cc b/pc/jseptransportcontroller.cc
index 80b7237..a44ae16 100644
--- a/pc/jseptransportcontroller.cc
+++ b/pc/jseptransportcontroller.cc
@@ -14,10 +14,10 @@
 #include <memory>
 #include <utility>
 
+#include "absl/memory/memory.h"
 #include "p2p/base/port.h"
 #include "rtc_base/bind.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/thread.h"
 
 using webrtc::SdpType;
@@ -411,10 +411,10 @@
     dtls = config_.external_transport_factory->CreateDtlsTransport(
         std::move(ice), config_.crypto_options);
   } else {
-    auto ice = rtc::MakeUnique<cricket::P2PTransportChannel>(
+    auto ice = absl::make_unique<cricket::P2PTransportChannel>(
         transport_name, component, port_allocator_, config_.event_log);
-    dtls = rtc::MakeUnique<cricket::DtlsTransport>(std::move(ice),
-                                                   config_.crypto_options);
+    dtls = absl::make_unique<cricket::DtlsTransport>(std::move(ice),
+                                                     config_.crypto_options);
   }
 
   RTC_DCHECK(dtls);
@@ -455,7 +455,7 @@
     rtc::PacketTransportInternal* rtcp_packet_transport) {
   RTC_DCHECK(network_thread_->IsCurrent());
   auto unencrypted_rtp_transport =
-      rtc::MakeUnique<RtpTransport>(rtcp_packet_transport == nullptr);
+      absl::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);
@@ -470,7 +470,7 @@
     cricket::DtlsTransportInternal* rtcp_dtls_transport) {
   RTC_DCHECK(network_thread_->IsCurrent());
   auto srtp_transport =
-      rtc::MakeUnique<webrtc::SrtpTransport>(rtcp_dtls_transport == nullptr);
+      absl::make_unique<webrtc::SrtpTransport>(rtcp_dtls_transport == nullptr);
   RTC_DCHECK(rtp_dtls_transport);
   srtp_transport->SetRtpPacketTransport(rtp_dtls_transport);
   if (rtcp_dtls_transport) {
@@ -488,7 +488,7 @@
     cricket::DtlsTransportInternal* rtp_dtls_transport,
     cricket::DtlsTransportInternal* rtcp_dtls_transport) {
   RTC_DCHECK(network_thread_->IsCurrent());
-  auto dtls_srtp_transport = rtc::MakeUnique<webrtc::DtlsSrtpTransport>(
+  auto dtls_srtp_transport = absl::make_unique<webrtc::DtlsSrtpTransport>(
       rtcp_dtls_transport == nullptr);
   if (config_.enable_external_auth) {
     dtls_srtp_transport->EnableExternalAuth();
@@ -987,7 +987,7 @@
   }
 
   std::unique_ptr<cricket::JsepTransport> jsep_transport =
-      rtc::MakeUnique<cricket::JsepTransport>(
+      absl::make_unique<cricket::JsepTransport>(
           content_info.name, certificate_, std::move(unencrypted_rtp_transport),
           std::move(sdes_transport), std::move(dtls_srtp_transport),
           std::move(rtp_dtls_transport), std::move(rtcp_dtls_transport));
diff --git a/pc/jseptransportcontroller_unittest.cc b/pc/jseptransportcontroller_unittest.cc
index 93f14c8..7bda977 100644
--- a/pc/jseptransportcontroller_unittest.cc
+++ b/pc/jseptransportcontroller_unittest.cc
@@ -11,13 +11,13 @@
 #include <map>
 #include <memory>
 
+#include "absl/memory/memory.h"
 #include "p2p/base/fakedtlstransport.h"
 #include "p2p/base/fakeicetransport.h"
 #include "p2p/base/transportfactoryinterface.h"
 #include "p2p/base/transportinfo.h"
 #include "pc/jseptransportcontroller.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/thread.h"
 #include "test/gtest.h"
 
@@ -46,8 +46,8 @@
   std::unique_ptr<cricket::IceTransportInternal> CreateIceTransport(
       const std::string& transport_name,
       int component) override {
-    return rtc::MakeUnique<cricket::FakeIceTransport>(transport_name,
-                                                      component);
+    return absl::make_unique<cricket::FakeIceTransport>(transport_name,
+                                                        component);
   }
 
   std::unique_ptr<cricket::DtlsTransportInternal> CreateDtlsTransport(
@@ -55,7 +55,7 @@
       const rtc::CryptoOptions& crypto_options) override {
     std::unique_ptr<cricket::FakeIceTransport> fake_ice(
         static_cast<cricket::FakeIceTransport*>(ice.release()));
-    return rtc::MakeUnique<FakeDtlsTransport>(std::move(fake_ice));
+    return absl::make_unique<FakeDtlsTransport>(std::move(fake_ice));
   }
 };
 
@@ -64,7 +64,7 @@
                                     public sigslot::has_slots<> {
  public:
   JsepTransportControllerTest() : signaling_thread_(rtc::Thread::Current()) {
-    fake_transport_factory_ = rtc::MakeUnique<FakeTransportFactory>();
+    fake_transport_factory_ = absl::make_unique<FakeTransportFactory>();
   }
 
   void CreateJsepTransportController(
@@ -75,7 +75,7 @@
     config.transport_observer = this;
     // The tests only works with |fake_transport_factory|;
     config.external_transport_factory = fake_transport_factory_.get();
-    transport_controller_ = rtc::MakeUnique<JsepTransportController>(
+    transport_controller_ = absl::make_unique<JsepTransportController>(
         signaling_thread, network_thread, port_allocator, config);
     ConnectTransportControllerSignals();
   }
@@ -91,7 +91,7 @@
 
   std::unique_ptr<cricket::SessionDescription>
   CreateSessionDescriptionWithoutBundle() {
-    auto description = rtc::MakeUnique<cricket::SessionDescription>();
+    auto description = absl::make_unique<cricket::SessionDescription>();
     AddAudioSection(description.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                     cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                     nullptr);
@@ -453,7 +453,7 @@
           rtc::SSLIdentity::Generate("session1", rtc::KT_DEFAULT)));
   rtc::scoped_refptr<rtc::RTCCertificate> returned_certificate;
 
-  auto description = rtc::MakeUnique<cricket::SessionDescription>();
+  auto description = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(description.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   certificate1);
@@ -511,11 +511,11 @@
           rtc::SSLIdentity::Generate("answer", rtc::KT_DEFAULT)));
   transport_controller_->SetLocalCertificate(offer_certificate);
 
-  auto offer_desc = rtc::MakeUnique<cricket::SessionDescription>();
+  auto offer_desc = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(offer_desc.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   offer_certificate);
-  auto answer_desc = rtc::MakeUnique<cricket::SessionDescription>();
+  auto answer_desc = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(answer_desc.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
                   answer_certificate);
@@ -772,11 +772,11 @@
 TEST_F(JsepTransportControllerTest, IceRoleRedeterminedOnIceRestartByDefault) {
   CreateJsepTransportController(JsepTransportController::Config());
   // Let the |transport_controller_| be the controlled side initially.
-  auto remote_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(remote_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
-  auto local_answer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_answer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_answer.get(), kAudioMid1, kIceUfrag2, kIcePwd2,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
                   nullptr);
@@ -794,7 +794,7 @@
             fake_dtls->fake_ice_transport()->GetIceRole());
 
   // New offer will trigger the ICE restart.
-  auto restart_local_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto restart_local_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(restart_local_offer.get(), kAudioMid1, kIceUfrag3, kIcePwd3,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
@@ -815,11 +815,11 @@
 
   CreateJsepTransportController(config);
   // Let the |transport_controller_| be the controlled side initially.
-  auto remote_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(remote_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
-  auto local_answer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_answer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_answer.get(), kAudioMid1, kIceUfrag2, kIcePwd2,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
                   nullptr);
@@ -837,7 +837,7 @@
             fake_dtls->fake_ice_transport()->GetIceRole());
 
   // New offer will trigger the ICE restart.
-  auto restart_local_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto restart_local_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(restart_local_offer.get(), kAudioMid1, kIceUfrag3, kIcePwd3,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
@@ -852,7 +852,7 @@
 // Tests ICE-Lite mode in remote answer.
 TEST_F(JsepTransportControllerTest, SetIceRoleWhenIceLiteInRemoteAnswer) {
   CreateJsepTransportController(JsepTransportController::Config());
-  auto local_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
@@ -866,7 +866,7 @@
   EXPECT_EQ(cricket::ICEMODE_FULL,
             fake_dtls->fake_ice_transport()->remote_ice_mode());
 
-  auto remote_answer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_answer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag2, kIcePwd2,
                   cricket::ICEMODE_LITE, cricket::CONNECTIONROLE_PASSIVE,
                   nullptr);
@@ -885,11 +885,11 @@
 TEST_F(JsepTransportControllerTest,
        IceRoleIsControllingAfterIceRestartFromIceLiteEndpoint) {
   CreateJsepTransportController(JsepTransportController::Config());
-  auto remote_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(remote_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_LITE, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
-  auto local_answer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_answer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
                   nullptr);
@@ -907,11 +907,11 @@
             fake_dtls->fake_ice_transport()->GetIceRole());
 
   // In the subsequence remote offer triggers an ICE restart.
-  auto remote_offer2 = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_offer2 = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(remote_offer2.get(), kAudioMid1, kIceUfrag2, kIcePwd2,
                   cricket::ICEMODE_LITE, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
-  auto local_answer2 = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_answer2 = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_answer2.get(), kAudioMid1, kIceUfrag2, kIcePwd2,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
                   nullptr);
@@ -938,7 +938,7 @@
   bundle_group.AddContentName(kVideoMid1);
   bundle_group.AddContentName(kDataMid1);
 
-  auto local_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
@@ -953,7 +953,7 @@
                  cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                  nullptr);
 
-  auto remote_answer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_answer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
                   nullptr);
@@ -1009,7 +1009,7 @@
   bundle_group.AddContentName(kAudioMid1);
   bundle_group.AddContentName(kVideoMid1);
 
-  auto local_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
@@ -1020,7 +1020,7 @@
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
 
-  auto remote_answer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_answer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
                   nullptr);
@@ -1061,12 +1061,12 @@
   cricket::ContentGroup bundle_group(cricket::GROUP_TYPE_BUNDLE);
   bundle_group.AddContentName(kDataMid1);
 
-  auto local_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_offer = absl::make_unique<cricket::SessionDescription>();
   AddDataSection(local_offer.get(), kDataMid1,
                  cricket::MediaProtocolType::kSctp, kIceUfrag1, kIcePwd1,
                  cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                  nullptr);
-  auto remote_answer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_answer = absl::make_unique<cricket::SessionDescription>();
   AddDataSection(remote_answer.get(), kDataMid1,
                  cricket::MediaProtocolType::kSctp, kIceUfrag1, kIcePwd1,
                  cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
@@ -1124,7 +1124,7 @@
   bundle_group.AddContentName(kVideoMid1);
   bundle_group.AddContentName(kDataMid1);
 
-  auto local_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
@@ -1136,7 +1136,7 @@
                  cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                  nullptr);
 
-  auto remote_answer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_answer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
                   nullptr);
@@ -1183,7 +1183,7 @@
   bundle_group.AddContentName(kAudioMid1);
   bundle_group.AddContentName(kVideoMid1);
 
-  auto local_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
@@ -1191,7 +1191,7 @@
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
 
-  auto remote_answer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_answer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
                   nullptr);
@@ -1233,7 +1233,7 @@
   bundle_group.AddContentName(kVideoMid1);
   bundle_group.AddContentName(kDataMid1);
 
-  auto local_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
@@ -1245,7 +1245,7 @@
                  cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                  nullptr);
 
-  auto remote_answer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_answer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
                   nullptr);
@@ -1286,7 +1286,7 @@
   JsepTransportController::Config config;
   config.rtcp_mux_policy = PeerConnectionInterface::kRtcpMuxPolicyRequire;
   CreateJsepTransportController(config);
-  auto local_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
@@ -1304,7 +1304,7 @@
   JsepTransportController::Config config;
   config.rtcp_mux_policy = PeerConnectionInterface::kRtcpMuxPolicyRequire;
   CreateJsepTransportController(config);
-  auto local_offer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto local_offer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(local_offer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_ACTPASS,
                   nullptr);
@@ -1312,7 +1312,7 @@
                   ->SetLocalDescription(SdpType::kOffer, local_offer.get())
                   .ok());
 
-  auto remote_answer = rtc::MakeUnique<cricket::SessionDescription>();
+  auto remote_answer = absl::make_unique<cricket::SessionDescription>();
   AddAudioSection(remote_answer.get(), kAudioMid1, kIceUfrag1, kIcePwd1,
                   cricket::ICEMODE_FULL, cricket::CONNECTIONROLE_PASSIVE,
                   nullptr);
diff --git a/pc/peerconnection.cc b/pc/peerconnection.cc
index 348569a..89f35c2 100644
--- a/pc/peerconnection.cc
+++ b/pc/peerconnection.cc
@@ -17,6 +17,7 @@
 #include <utility>
 #include <vector>
 
+#include "absl/memory/memory.h"
 #include "api/jsepicecandidate.h"
 #include "api/jsepsessiondescription.h"
 #include "api/mediaconstraintsinterface.h"
@@ -46,7 +47,6 @@
 #include "rtc_base/checks.h"
 #include "rtc_base/logging.h"
 #include "rtc_base/numerics/safe_conversions.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/stringencode.h"
 #include "rtc_base/stringutils.h"
 #include "rtc_base/trace_event.h"
@@ -3142,7 +3142,7 @@
         bitrate_allocation_strategy.release();
     auto functor = [this, strategy_raw]() {
       call_->SetBitrateAllocationStrategy(
-          rtc::WrapUnique<rtc::BitrateAllocationStrategy>(strategy_raw));
+          absl::WrapUnique<rtc::BitrateAllocationStrategy>(strategy_raw));
     };
     worker_thread->Invoke<void>(RTC_FROM_HERE, functor);
     return;
@@ -3211,7 +3211,7 @@
                               ? RtcEventLog::kUnlimitedOutput
                               : rtc::saturated_cast<size_t>(max_size_bytes);
   return StartRtcEventLog(
-      rtc::MakeUnique<RtcEventLogOutputFile>(file, max_size),
+      absl::make_unique<RtcEventLogOutputFile>(file, max_size),
       webrtc::RtcEventLog::kImmediateOutput);
 }
 
diff --git a/pc/peerconnection_bundle_unittest.cc b/pc/peerconnection_bundle_unittest.cc
index b31861d..3211f26 100644
--- a/pc/peerconnection_bundle_unittest.cc
+++ b/pc/peerconnection_bundle_unittest.cc
@@ -23,10 +23,10 @@
 #ifdef WEBRTC_ANDROID
 #include "pc/test/androidtestinitializer.h"
 #endif
+#include "absl/memory/memory.h"
 #include "pc/test/fakeaudiocapturemodule.h"
 #include "rtc_base/fakenetwork.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/virtualsocketserver.h"
 #include "test/gmock.h"
 
@@ -183,11 +183,11 @@
   WrapperPtr CreatePeerConnection(const RTCConfiguration& config) {
     auto* fake_network = NewFakeNetwork();
     auto port_allocator =
-        rtc::MakeUnique<cricket::BasicPortAllocator>(fake_network);
+        absl::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 = rtc::MakeUnique<MockPeerConnectionObserver>();
+    auto observer = absl::make_unique<MockPeerConnectionObserver>();
     RTCConfiguration modified_config = config;
     modified_config.sdp_semantics = sdp_semantics_;
     auto pc = pc_factory_->CreatePeerConnection(
@@ -196,7 +196,7 @@
       return nullptr;
     }
 
-    auto wrapper = rtc::MakeUnique<PeerConnectionWrapperForBundleTest>(
+    auto wrapper = absl::make_unique<PeerConnectionWrapperForBundleTest>(
         pc_factory_, pc, std::move(observer));
     wrapper->set_network(fake_network);
     return wrapper;
diff --git a/pc/peerconnection_crypto_unittest.cc b/pc/peerconnection_crypto_unittest.cc
index 5077358..5a8b5b8 100644
--- a/pc/peerconnection_crypto_unittest.cc
+++ b/pc/peerconnection_crypto_unittest.cc
@@ -19,10 +19,10 @@
 #ifdef WEBRTC_ANDROID
 #include "pc/test/androidtestinitializer.h"
 #endif
+#include "absl/memory/memory.h"
 #include "pc/test/fakeaudiocapturemodule.h"
 #include "pc/test/fakertccertificategenerator.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/virtualsocketserver.h"
 
 namespace webrtc {
@@ -64,9 +64,9 @@
   WrapperPtr CreatePeerConnection(
       const RTCConfiguration& config,
       std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_gen) {
-    auto fake_port_allocator = rtc::MakeUnique<cricket::FakePortAllocator>(
+    auto fake_port_allocator = absl::make_unique<cricket::FakePortAllocator>(
         rtc::Thread::Current(), nullptr);
-    auto observer = rtc::MakeUnique<MockPeerConnectionObserver>();
+    auto observer = absl::make_unique<MockPeerConnectionObserver>();
     RTCConfiguration modified_config = config;
     modified_config.sdp_semantics = sdp_semantics_;
     auto pc = pc_factory_->CreatePeerConnection(
@@ -76,8 +76,8 @@
       return nullptr;
     }
 
-    return rtc::MakeUnique<PeerConnectionWrapper>(pc_factory_, pc,
-                                                  std::move(observer));
+    return absl::make_unique<PeerConnectionWrapper>(pc_factory_, pc,
+                                                    std::move(observer));
   }
 
   // Accepts the same arguments as CreatePeerConnection and adds default audio
@@ -566,7 +566,7 @@
   RTCConfiguration config;
   config.enable_dtls_srtp.emplace(true);
   auto owned_fake_certificate_generator =
-      rtc::MakeUnique<FakeRTCCertificateGenerator>();
+      absl::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/peerconnection_datachannel_unittest.cc b/pc/peerconnection_datachannel_unittest.cc
index 224d0e9..033a609 100644
--- a/pc/peerconnection_datachannel_unittest.cc
+++ b/pc/peerconnection_datachannel_unittest.cc
@@ -20,9 +20,9 @@
 #ifdef WEBRTC_ANDROID
 #include "pc/test/androidtestinitializer.h"
 #endif
+#include "absl/memory/memory.h"
 #include "pc/test/fakesctptransport.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/virtualsocketserver.h"
 
 namespace webrtc {
@@ -39,13 +39,13 @@
             rtc::Thread::Current(),
             rtc::Thread::Current(),
             rtc::Thread::Current(),
-            rtc::MakeUnique<cricket::FakeMediaEngine>(),
+            absl::make_unique<cricket::FakeMediaEngine>(),
             CreateCallFactory(),
             nullptr) {}
 
   std::unique_ptr<cricket::SctpTransportInternalFactory>
   CreateSctpTransportInternalFactory() {
-    auto factory = rtc::MakeUnique<FakeSctpTransportFactory>();
+    auto factory = absl::make_unique<FakeSctpTransportFactory>();
     last_fake_sctp_transport_factory_ = factory.get();
     return factory;
   }
@@ -114,7 +114,7 @@
         new PeerConnectionFactoryForDataChannelTest());
     pc_factory->SetOptions(factory_options);
     RTC_CHECK(pc_factory->Initialize());
-    auto observer = rtc::MakeUnique<MockPeerConnectionObserver>();
+    auto observer = absl::make_unique<MockPeerConnectionObserver>();
     RTCConfiguration modified_config = config;
     modified_config.sdp_semantics = sdp_semantics_;
     auto pc = pc_factory->CreatePeerConnection(modified_config, nullptr,
@@ -123,7 +123,7 @@
       return nullptr;
     }
 
-    auto wrapper = rtc::MakeUnique<PeerConnectionWrapperForDataChannelTest>(
+    auto wrapper = absl::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/peerconnection_histogram_unittest.cc b/pc/peerconnection_histogram_unittest.cc
index e5c0426..b998372 100644
--- a/pc/peerconnection_histogram_unittest.cc
+++ b/pc/peerconnection_histogram_unittest.cc
@@ -10,6 +10,7 @@
 
 #include <tuple>
 
+#include "absl/memory/memory.h"
 #include "api/fakemetricsobserver.h"
 #include "api/peerconnectionproxy.h"
 #include "media/base/fakemediaengine.h"
@@ -20,7 +21,6 @@
 #include "pc/sdputils.h"
 #include "pc/test/fakesctptransport.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/virtualsocketserver.h"
 
 namespace webrtc {
@@ -47,7 +47,7 @@
             rtc::Thread::Current(),
             rtc::Thread::Current(),
             rtc::Thread::Current(),
-            rtc::MakeUnique<cricket::FakeMediaEngine>(),
+            absl::make_unique<cricket::FakeMediaEngine>(),
             CreateCallFactory(),
             nullptr) {}
 
@@ -155,15 +155,16 @@
     if (immediate_report) {
       pc_factory->ReturnHistogramVeryQuickly();
     }
-    auto observer = rtc::MakeUnique<ObserverForUsageHistogramTest>();
+    auto observer = absl::make_unique<ObserverForUsageHistogramTest>();
     auto pc = pc_factory->CreatePeerConnection(config, nullptr, nullptr,
                                                observer.get());
     if (!pc) {
       return nullptr;
     }
 
-    auto wrapper = rtc::MakeUnique<PeerConnectionWrapperForUsageHistogramTest>(
-        pc_factory, pc, std::move(observer));
+    auto wrapper =
+        absl::make_unique<PeerConnectionWrapperForUsageHistogramTest>(
+            pc_factory, pc, std::move(observer));
     return wrapper;
   }
 
diff --git a/pc/peerconnection_ice_unittest.cc b/pc/peerconnection_ice_unittest.cc
index cf9f016..fcd5fac 100644
--- a/pc/peerconnection_ice_unittest.cc
+++ b/pc/peerconnection_ice_unittest.cc
@@ -18,6 +18,7 @@
 #ifdef WEBRTC_ANDROID
 #include "pc/test/androidtestinitializer.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/peerconnectionproxy.h"
@@ -26,7 +27,6 @@
 #include "pc/test/fakeaudiocapturemodule.h"
 #include "rtc_base/fakenetwork.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/virtualsocketserver.h"
 
 namespace webrtc {
@@ -104,20 +104,20 @@
   WrapperPtr CreatePeerConnection(const RTCConfiguration& config) {
     auto* fake_network = NewFakeNetwork();
     auto port_allocator =
-        rtc::MakeUnique<cricket::BasicPortAllocator>(fake_network);
+        absl::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 = rtc::MakeUnique<MockPeerConnectionObserver>();
+    auto observer = absl::make_unique<MockPeerConnectionObserver>();
     auto pc = pc_factory_->CreatePeerConnection(
         modified_config, std::move(port_allocator), nullptr, observer.get());
     if (!pc) {
       return nullptr;
     }
 
-    auto wrapper = rtc::MakeUnique<PeerConnectionWrapperForIceTest>(
+    auto wrapper = absl::make_unique<PeerConnectionWrapperForIceTest>(
         pc_factory_, pc, std::move(observer));
     wrapper->set_network(fake_network);
     return wrapper;
diff --git a/pc/peerconnection_integrationtest.cc b/pc/peerconnection_integrationtest.cc
index 0bd9066..ed5db1f 100644
--- a/pc/peerconnection_integrationtest.cc
+++ b/pc/peerconnection_integrationtest.cc
@@ -885,7 +885,7 @@
       ASSERT_TRUE(fake_video_renderers_.find(video_track->id()) ==
                   fake_video_renderers_.end());
       fake_video_renderers_[video_track->id()] =
-          rtc::MakeUnique<FakeVideoTrackRenderer>(video_track);
+          absl::make_unique<FakeVideoTrackRenderer>(video_track);
     }
   }
   void OnRemoveTrack(
@@ -1165,7 +1165,7 @@
     modified_config.sdp_semantics = sdp_semantics_;
     if (!dependencies.cert_generator) {
       dependencies.cert_generator =
-          rtc::MakeUnique<FakeRTCCertificateGenerator>();
+          absl::make_unique<FakeRTCCertificateGenerator>();
     }
     std::unique_ptr<PeerConnectionWrapper> client(
         new PeerConnectionWrapper(debug_name));
@@ -1303,7 +1303,7 @@
         network_thread()->Invoke<std::unique_ptr<cricket::TestTurnServer>>(
             RTC_FROM_HERE,
             [thread, internal_address, external_address, type, common_name] {
-              return rtc::MakeUnique<cricket::TestTurnServer>(
+              return absl::make_unique<cricket::TestTurnServer>(
                   thread, internal_address, external_address, type,
                   /*ignore_bad_certs=*/true, common_name);
             });
@@ -1316,7 +1316,7 @@
     std::unique_ptr<cricket::TestTurnCustomizer> turn_customizer =
         network_thread()->Invoke<std::unique_ptr<cricket::TestTurnCustomizer>>(
             RTC_FROM_HERE,
-            [] { return rtc::MakeUnique<cricket::TestTurnCustomizer>(); });
+            [] { return absl::make_unique<cricket::TestTurnCustomizer>(); });
     turn_customizers_.push_back(std::move(turn_customizer));
     // Interactions with the turn customizer should be done on the network
     // thread.
@@ -4282,7 +4282,7 @@
   ASSERT_TRUE(CreatePeerConnectionWrappers());
   ConnectFakeSignaling();
 
-  auto output = rtc::MakeUnique<testing::NiceMock<MockRtcEventLogOutput>>();
+  auto output = absl::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/peerconnection_jsep_unittest.cc b/pc/peerconnection_jsep_unittest.cc
index 4cd3799..7de0a3f 100644
--- a/pc/peerconnection_jsep_unittest.cc
+++ b/pc/peerconnection_jsep_unittest.cc
@@ -21,10 +21,10 @@
 #ifdef WEBRTC_ANDROID
 #include "pc/test/androidtestinitializer.h"
 #endif
+#include "absl/memory/memory.h"
 #include "pc/test/fakeaudiocapturemodule.h"
 #include "pc/test/fakesctptransport.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/virtualsocketserver.h"
 #include "test/gmock.h"
 
@@ -63,7 +63,7 @@
 
   std::unique_ptr<cricket::SctpTransportInternalFactory>
   CreateSctpTransportInternalFactory() {
-    return rtc::MakeUnique<FakeSctpTransportFactory>();
+    return absl::make_unique<FakeSctpTransportFactory>();
   }
 };
 
@@ -88,15 +88,15 @@
     rtc::scoped_refptr<PeerConnectionFactory> pc_factory(
         new rtc::RefCountedObject<PeerConnectionFactoryForJsepTest>());
     RTC_CHECK(pc_factory->Initialize());
-    auto observer = rtc::MakeUnique<MockPeerConnectionObserver>();
+    auto observer = absl::make_unique<MockPeerConnectionObserver>();
     auto pc = pc_factory->CreatePeerConnection(config, nullptr, nullptr,
                                                observer.get());
     if (!pc) {
       return nullptr;
     }
 
-    return rtc::MakeUnique<PeerConnectionWrapper>(pc_factory, pc,
-                                                  std::move(observer));
+    return absl::make_unique<PeerConnectionWrapper>(pc_factory, pc,
+                                                    std::move(observer));
   }
 
   std::unique_ptr<rtc::VirtualSocketServer> vss_;
diff --git a/pc/peerconnection_media_unittest.cc b/pc/peerconnection_media_unittest.cc
index f59d6aa..cc7ae9a 100644
--- a/pc/peerconnection_media_unittest.cc
+++ b/pc/peerconnection_media_unittest.cc
@@ -25,9 +25,9 @@
 #ifdef WEBRTC_ANDROID
 #include "pc/test/androidtestinitializer.h"
 #endif
+#include "absl/memory/memory.h"
 #include "pc/test/fakertccertificategenerator.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/virtualsocketserver.h"
 #include "test/gmock.h"
 
@@ -72,16 +72,16 @@
   }
 
   WrapperPtr CreatePeerConnection(const RTCConfiguration& config) {
-    auto media_engine = rtc::MakeUnique<FakeMediaEngine>();
+    auto media_engine = absl::make_unique<FakeMediaEngine>();
     auto* media_engine_ptr = media_engine.get();
     auto pc_factory = CreateModularPeerConnectionFactory(
         rtc::Thread::Current(), rtc::Thread::Current(), rtc::Thread::Current(),
         std::move(media_engine), CreateCallFactory(),
         CreateRtcEventLogFactory());
 
-    auto fake_port_allocator = rtc::MakeUnique<cricket::FakePortAllocator>(
+    auto fake_port_allocator = absl::make_unique<cricket::FakePortAllocator>(
         rtc::Thread::Current(), nullptr);
-    auto observer = rtc::MakeUnique<MockPeerConnectionObserver>();
+    auto observer = absl::make_unique<MockPeerConnectionObserver>();
     auto modified_config = config;
     modified_config.sdp_semantics = sdp_semantics_;
     auto pc = pc_factory->CreatePeerConnection(modified_config,
@@ -91,7 +91,7 @@
       return nullptr;
     }
 
-    auto wrapper = rtc::MakeUnique<PeerConnectionWrapperForMediaTest>(
+    auto wrapper = absl::make_unique<PeerConnectionWrapperForMediaTest>(
         pc_factory, pc, std::move(observer));
     wrapper->set_media_engine(media_engine_ptr);
     return wrapper;
diff --git a/pc/peerconnection_rampup_tests.cc b/pc/peerconnection_rampup_tests.cc
index 7a77a9e..6d6a9fc 100644
--- a/pc/peerconnection_rampup_tests.cc
+++ b/pc/peerconnection_rampup_tests.cc
@@ -156,7 +156,7 @@
     fake_network_manager->AddInterface(kDefaultLocalAddress);
     fake_network_managers_.emplace_back(fake_network_manager);
 
-    auto observer = rtc::MakeUnique<MockPeerConnectionObserver>();
+    auto observer = absl::make_unique<MockPeerConnectionObserver>();
     webrtc::PeerConnectionDependencies dependencies(observer.get());
     cricket::BasicPortAllocator* port_allocator =
         new cricket::BasicPortAllocator(fake_network_manager);
@@ -164,7 +164,7 @@
     dependencies.allocator =
         std::unique_ptr<cricket::BasicPortAllocator>(port_allocator);
     dependencies.tls_cert_verifier =
-        rtc::MakeUnique<rtc::TestCertificateVerifier>();
+        absl::make_unique<rtc::TestCertificateVerifier>();
 
     auto pc =
         pc_factory_->CreatePeerConnection(config, std::move(dependencies));
@@ -172,7 +172,7 @@
       return nullptr;
     }
 
-    return rtc::MakeUnique<PeerConnectionWrapperForRampUpTest>(
+    return absl::make_unique<PeerConnectionWrapperForRampUpTest>(
         pc_factory_, pc, std::move(observer));
   }
 
@@ -214,7 +214,7 @@
                   kTurnInternalAddress, kTurnInternalPort};
               static const rtc::SocketAddress turn_server_external_address{
                   kTurnExternalAddress, kTurnExternalPort};
-              return rtc::MakeUnique<cricket::TestTurnServer>(
+              return absl::make_unique<cricket::TestTurnServer>(
                   thread, turn_server_internal_address,
                   turn_server_external_address, type,
                   true /*ignore_bad_certs=*/, common_name);
diff --git a/pc/peerconnection_rtp_unittest.cc b/pc/peerconnection_rtp_unittest.cc
index 2bbf77c..50fe0dc 100644
--- a/pc/peerconnection_rtp_unittest.cc
+++ b/pc/peerconnection_rtp_unittest.cc
@@ -11,6 +11,7 @@
 #include <memory>
 #include <vector>
 
+#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/jsep.h"
@@ -28,7 +29,6 @@
 #include "pc/test/mockpeerconnectionobservers.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/refcountedobject.h"
 #include "rtc_base/scoped_ref_ptr.h"
 #include "rtc_base/thread.h"
@@ -111,11 +111,11 @@
   // adjustment.
   std::unique_ptr<PeerConnectionWrapper> CreatePeerConnectionInternal(
       const RTCConfiguration& config) {
-    auto observer = rtc::MakeUnique<MockPeerConnectionObserver>();
+    auto observer = absl::make_unique<MockPeerConnectionObserver>();
     auto pc = pc_factory_->CreatePeerConnection(config, nullptr, nullptr,
                                                 observer.get());
-    return rtc::MakeUnique<PeerConnectionWrapper>(pc_factory_, pc,
-                                                  std::move(observer));
+    return absl::make_unique<PeerConnectionWrapper>(pc_factory_, pc,
+                                                    std::move(observer));
   }
 };
 
diff --git a/pc/peerconnection_signaling_unittest.cc b/pc/peerconnection_signaling_unittest.cc
index 73a659b..95f464b 100644
--- a/pc/peerconnection_signaling_unittest.cc
+++ b/pc/peerconnection_signaling_unittest.cc
@@ -24,10 +24,10 @@
 #ifdef WEBRTC_ANDROID
 #include "pc/test/androidtestinitializer.h"
 #endif
+#include "absl/memory/memory.h"
 #include "pc/test/fakeaudiocapturemodule.h"
 #include "pc/test/fakertccertificategenerator.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/stringutils.h"
 #include "rtc_base/virtualsocketserver.h"
 #include "test/gmock.h"
@@ -81,7 +81,7 @@
   }
 
   WrapperPtr CreatePeerConnection(const RTCConfiguration& config) {
-    auto observer = rtc::MakeUnique<MockPeerConnectionObserver>();
+    auto observer = absl::make_unique<MockPeerConnectionObserver>();
     RTCConfiguration modified_config = config;
     modified_config.sdp_semantics = sdp_semantics_;
     auto pc = pc_factory_->CreatePeerConnection(modified_config, nullptr,
@@ -90,7 +90,7 @@
       return nullptr;
     }
 
-    return rtc::MakeUnique<PeerConnectionWrapperForSignalingTest>(
+    return absl::make_unique<PeerConnectionWrapperForSignalingTest>(
         pc_factory_, pc, std::move(observer));
   }
 
diff --git a/pc/peerconnectionendtoend_unittest.cc b/pc/peerconnectionendtoend_unittest.cc
index f9b3dc3..61de4a8 100644
--- a/pc/peerconnectionendtoend_unittest.cc
+++ b/pc/peerconnectionendtoend_unittest.cc
@@ -10,6 +10,7 @@
 
 #include <memory>
 
+#include "absl/memory/memory.h"
 #include "api/audio_codecs/L16/audio_decoder_L16.h"
 #include "api/audio_codecs/L16/audio_encoder_L16.h"
 #include "api/audio_codecs/audio_codec_pair_id.h"
@@ -19,7 +20,6 @@
 #include "api/audio_codecs/builtin_audio_encoder_factory.h"
 #include "rtc_base/gunit.h"
 #include "rtc_base/logging.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/stringencode.h"
 #include "rtc_base/stringutils.h"
 
@@ -210,7 +210,7 @@
 
   const auto dec = real_decoder.get();  // For lambda capturing.
   auto mock_decoder =
-      rtc::MakeUnique<ForwardingMockDecoder>(std::move(real_decoder));
+      absl::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/peerconnectionfactory.cc b/pc/peerconnectionfactory.cc
index cade31c..4d9455c 100644
--- a/pc/peerconnectionfactory.cc
+++ b/pc/peerconnectionfactory.cc
@@ -13,6 +13,7 @@
 #include <utility>
 #include <vector>
 
+#include "absl/memory/memory.h"
 #include "api/fec_controller.h"
 #include "api/mediaconstraintsinterface.h"
 #include "api/mediastreamproxy.h"
@@ -27,7 +28,6 @@
 #include "pc/rtpparametersconversion.h"
 #include "rtc_base/bind.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/ptr_util.h"
 // Adding 'nogncheck' to disable the gn include headers check to support modular
 // WebRTC build targets.
 // TODO(zhihuang): This wouldn't be necessary if the interface and
@@ -147,7 +147,7 @@
       injected_network_controller_factory_(
           std::move(network_controller_factory)),
       bbr_network_controller_factory_(
-          rtc::MakeUnique<BbrNetworkControllerFactory>()) {
+          absl::make_unique<BbrNetworkControllerFactory>()) {
   if (!network_thread_) {
     owned_network_thread_ = rtc::Thread::CreateWithSocketServer();
     owned_network_thread_->SetName("pc_network_thread", nullptr);
@@ -217,8 +217,8 @@
     return false;
   }
 
-  channel_manager_ = rtc::MakeUnique<cricket::ChannelManager>(
-      std::move(media_engine_), rtc::MakeUnique<cricket::RtpDataEngine>(),
+  channel_manager_ = absl::make_unique<cricket::ChannelManager>(
+      std::move(media_engine_), absl::make_unique<cricket::RtpDataEngine>(),
       worker_thread_, network_thread_);
 
   channel_manager_->SetVideoRtxEnabled(true);
@@ -368,8 +368,9 @@
 
   // Set internal defaults if optional dependencies are not set.
   if (!dependencies.cert_generator) {
-    dependencies.cert_generator = rtc::MakeUnique<rtc::RTCCertificateGenerator>(
-        signaling_thread_, network_thread_);
+    dependencies.cert_generator =
+        absl::make_unique<rtc::RTCCertificateGenerator>(signaling_thread_,
+                                                        network_thread_);
   }
   if (!dependencies.allocator) {
     dependencies.allocator.reset(new cricket::BasicPortAllocator(
@@ -428,7 +429,7 @@
 std::unique_ptr<cricket::SctpTransportInternalFactory>
 PeerConnectionFactory::CreateSctpTransportInternalFactory() {
 #ifdef HAVE_SCTP
-  return rtc::MakeUnique<cricket::SctpTransportFactory>(network_thread());
+  return absl::make_unique<cricket::SctpTransportFactory>(network_thread());
 #else
   return nullptr;
 #endif
@@ -457,7 +458,7 @@
   const auto encoding_type = RtcEventLog::EncodingType::Legacy;
   return event_log_factory_
              ? event_log_factory_->CreateRtcEventLog(encoding_type)
-             : rtc::MakeUnique<RtcEventLogNullImpl>();
+             : absl::make_unique<RtcEventLogNullImpl>();
 }
 
 std::unique_ptr<Call> PeerConnectionFactory::CreateCall_w(
diff --git a/pc/peerconnectioninterface_unittest.cc b/pc/peerconnectioninterface_unittest.cc
index 9b4a9e7..25e7a2c 100644
--- a/pc/peerconnectioninterface_unittest.cc
+++ b/pc/peerconnectioninterface_unittest.cc
@@ -14,6 +14,7 @@
 #include <string>
 #include <utility>
 
+#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/jsepsessiondescription.h"
@@ -44,7 +45,6 @@
 #include "pc/videocapturertracksource.h"
 #include "pc/videotrack.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/stringutils.h"
 #include "rtc_base/virtualsocketserver.h"
 #include "test/gmock.h"
@@ -826,7 +826,7 @@
   rtc::scoped_refptr<VideoTrackInterface> CreateVideoTrack(
       const std::string& label) {
     auto video_source = pc_factory_->CreateVideoSource(
-        rtc::MakeUnique<cricket::FakeVideoCapturer>(), nullptr);
+        absl::make_unique<cricket::FakeVideoCapturer>(), nullptr);
     return pc_factory_->CreateVideoTrack(label, video_source);
   }
 
@@ -3200,8 +3200,8 @@
   std::unique_ptr<SessionDescriptionInterface> offer;
   ASSERT_TRUE(DoCreateOffer(&offer, nullptr));
   // Grab a copy of the offer before it gets passed into the PC.
-  auto modified_offer =
-      rtc::MakeUnique<webrtc::JsepSessionDescription>(webrtc::SdpType::kOffer);
+  auto modified_offer = absl::make_unique<webrtc::JsepSessionDescription>(
+      webrtc::SdpType::kOffer);
   modified_offer->Initialize(offer->description()->Copy(), offer->session_id(),
                              offer->session_version());
   EXPECT_TRUE(DoSetLocalDescription(std::move(offer)));
@@ -3531,7 +3531,7 @@
   rtc::PlatformFile file = 0;
   int64_t max_size_bytes = 1024;
   EXPECT_FALSE(pc_->StartRtcEventLog(
-      rtc::MakeUnique<webrtc::RtcEventLogOutputFile>(file, max_size_bytes),
+      absl::make_unique<webrtc::RtcEventLogOutputFile>(file, max_size_bytes),
       webrtc::RtcEventLog::kImmediateOutput));
   pc_->StopRtcEventLog();
 }
diff --git a/pc/peerconnectionwrapper.cc b/pc/peerconnectionwrapper.cc
index dfc5af7..0d19cf3 100644
--- a/pc/peerconnectionwrapper.cc
+++ b/pc/peerconnectionwrapper.cc
@@ -15,12 +15,12 @@
 #include <utility>
 #include <vector>
 
+#include "absl/memory/memory.h"
 #include "api/jsepsessiondescription.h"
 #include "pc/sdputils.h"
 #include "pc/test/fakevideotracksource.h"
 #include "rtc_base/function_view.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 
 namespace webrtc {
 
diff --git a/pc/remoteaudiosource.cc b/pc/remoteaudiosource.cc
index f58e23d..94fdb87 100644
--- a/pc/remoteaudiosource.cc
+++ b/pc/remoteaudiosource.cc
@@ -15,10 +15,10 @@
 #include <memory>
 #include <utility>
 
+#include "absl/memory/memory.h"
 #include "rtc_base/checks.h"
 #include "rtc_base/constructormagic.h"
 #include "rtc_base/logging.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/thread.h"
 
 namespace webrtc {
@@ -66,7 +66,8 @@
   // notified when a channel goes out of scope (signaled when "AudioDataProxy"
   // is destroyed).
   worker_thread_->Invoke<void>(RTC_FROM_HERE, [&] {
-    media_channel->SetRawAudioSink(ssrc, rtc::MakeUnique<AudioDataProxy>(this));
+    media_channel->SetRawAudioSink(ssrc,
+                                   absl::make_unique<AudioDataProxy>(this));
   });
 }
 
diff --git a/pc/rtcstatscollector.cc b/pc/rtcstatscollector.cc
index 35cae8c..9b7708e 100644
--- a/pc/rtcstatscollector.cc
+++ b/pc/rtcstatscollector.cc
@@ -15,6 +15,7 @@
 #include <utility>
 #include <vector>
 
+#include "absl/memory/memory.h"
 #include "api/candidate.h"
 #include "api/mediastreaminterface.h"
 #include "api/peerconnectioninterface.h"
@@ -24,7 +25,6 @@
 #include "pc/peerconnection.h"
 #include "pc/rtcstatstraversal.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/strings/string_builder.h"
 #include "rtc_base/timeutils.h"
 #include "rtc_base/trace_event.h"
@@ -1195,7 +1195,7 @@
        track_media_info_map.voice_media_info()->receivers) {
     if (!voice_receiver_info.connected())
       continue;
-    auto inbound_audio = rtc::MakeUnique<RTCInboundRTPStreamStats>(
+    auto inbound_audio = absl::make_unique<RTCInboundRTPStreamStats>(
         RTCInboundRTPStreamStatsIDFromSSRC(true, voice_receiver_info.ssrc()),
         timestamp_us);
     SetInboundRTPStreamStatsFromVoiceReceiverInfo(mid, voice_receiver_info,
@@ -1217,7 +1217,7 @@
        track_media_info_map.voice_media_info()->senders) {
     if (!voice_sender_info.connected())
       continue;
-    auto outbound_audio = rtc::MakeUnique<RTCOutboundRTPStreamStats>(
+    auto outbound_audio = absl::make_unique<RTCOutboundRTPStreamStats>(
         RTCOutboundRTPStreamStatsIDFromSSRC(true, voice_sender_info.ssrc()),
         timestamp_us);
     SetOutboundRTPStreamStatsFromVoiceSenderInfo(mid, voice_sender_info,
@@ -1253,7 +1253,7 @@
        track_media_info_map.video_media_info()->receivers) {
     if (!video_receiver_info.connected())
       continue;
-    auto inbound_video = rtc::MakeUnique<RTCInboundRTPStreamStats>(
+    auto inbound_video = absl::make_unique<RTCInboundRTPStreamStats>(
         RTCInboundRTPStreamStatsIDFromSSRC(false, video_receiver_info.ssrc()),
         timestamp_us);
     SetInboundRTPStreamStatsFromVideoReceiverInfo(mid, video_receiver_info,
@@ -1274,7 +1274,7 @@
        track_media_info_map.video_media_info()->senders) {
     if (!video_sender_info.connected())
       continue;
-    auto outbound_video = rtc::MakeUnique<RTCOutboundRTPStreamStats>(
+    auto outbound_video = absl::make_unique<RTCOutboundRTPStreamStats>(
         RTCOutboundRTPStreamStatsIDFromSSRC(false, video_sender_info.ssrc()),
         timestamp_us);
     SetOutboundRTPStreamStatsFromVideoSenderInfo(mid, video_sender_info,
@@ -1429,13 +1429,13 @@
       RTC_DCHECK(voice_stats.find(voice_channel->media_channel()) ==
                  voice_stats.end());
       voice_stats[voice_channel->media_channel()] =
-          rtc::MakeUnique<cricket::VoiceMediaInfo>();
+          absl::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()] =
-          rtc::MakeUnique<cricket::VideoMediaInfo>();
+          absl::make_unique<cricket::VideoMediaInfo>();
     } else {
       RTC_NOTREACHED();
     }
@@ -1485,7 +1485,7 @@
     for (auto receiver : transceiver->receivers()) {
       receivers.push_back(receiver->internal());
     }
-    stats.track_media_info_map = rtc::MakeUnique<TrackMediaInfoMap>(
+    stats.track_media_info_map = absl::make_unique<TrackMediaInfoMap>(
         std::move(voice_media_info), std::move(video_media_info), senders,
         receivers);
   }
diff --git a/pc/rtcstatscollector_unittest.cc b/pc/rtcstatscollector_unittest.cc
index ea99c8d..178440b 100644
--- a/pc/rtcstatscollector_unittest.cc
+++ b/pc/rtcstatscollector_unittest.cc
@@ -15,6 +15,7 @@
 #include <utility>
 #include <vector>
 
+#include "absl/memory/memory.h"
 #include "api/rtpparameters.h"
 #include "api/stats/rtcstats_objects.h"
 #include "api/stats/rtcstatsreport.h"
@@ -34,7 +35,6 @@
 #include "rtc_base/fakesslidentity.h"
 #include "rtc_base/gunit.h"
 #include "rtc_base/logging.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/stringutils.h"
 #include "rtc_base/timeutils.h"
 
diff --git a/pc/rtpsenderreceiver_unittest.cc b/pc/rtpsenderreceiver_unittest.cc
index 2adc5be..3e0488d 100644
--- a/pc/rtpsenderreceiver_unittest.cc
+++ b/pc/rtpsenderreceiver_unittest.cc
@@ -61,8 +61,8 @@
         // Create fake media engine/etc. so we can create channels to use to
         // test RtpSenders/RtpReceivers.
         media_engine_(new cricket::FakeMediaEngine()),
-        channel_manager_(rtc::WrapUnique(media_engine_),
-                         rtc::MakeUnique<cricket::RtpDataEngine>(),
+        channel_manager_(absl::WrapUnique(media_engine_),
+                         absl::make_unique<cricket::RtpDataEngine>(),
                          worker_thread_,
                          network_thread_),
         fake_call_(),
@@ -70,7 +70,7 @@
     // Create channels to be used by the RtpSenders and RtpReceivers.
     channel_manager_.Init();
     bool srtp_required = true;
-    rtp_dtls_transport_ = rtc::MakeUnique<cricket::FakeDtlsTransport>(
+    rtp_dtls_transport_ = absl::make_unique<cricket::FakeDtlsTransport>(
         "fake_dtls_transport", cricket::ICE_CANDIDATE_COMPONENT_RTP);
     rtp_transport_ = CreateDtlsSrtpTransport();
 
@@ -114,8 +114,8 @@
   }
 
   std::unique_ptr<webrtc::RtpTransportInternal> CreateDtlsSrtpTransport() {
-    auto dtls_srtp_transport =
-        rtc::MakeUnique<webrtc::DtlsSrtpTransport>(/*rtcp_mux_required=*/true);
+    auto dtls_srtp_transport = absl::make_unique<webrtc::DtlsSrtpTransport>(
+        /*rtcp_mux_required=*/true);
     dtls_srtp_transport->SetDtlsTransports(rtp_dtls_transport_.get(),
                                            /*rtcp_dtls_transport=*/nullptr);
     return dtls_srtp_transport;
diff --git a/pc/sdputils.cc b/pc/sdputils.cc
index de77d63..07bff7b 100644
--- a/pc/sdputils.cc
+++ b/pc/sdputils.cc
@@ -13,8 +13,8 @@
 #include <string>
 #include <utility>
 
+#include "absl/memory/memory.h"
 #include "api/jsepsessiondescription.h"
-#include "rtc_base/ptr_util.h"
 
 namespace webrtc {
 
@@ -28,7 +28,7 @@
     const SessionDescriptionInterface* sdesc,
     SdpType type) {
   RTC_DCHECK(sdesc);
-  auto clone = rtc::MakeUnique<JsepSessionDescription>(type);
+  auto clone = absl::make_unique<JsepSessionDescription>(type);
   clone->Initialize(sdesc->description()->Copy(), 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/srtpsession_unittest.cc b/pc/srtpsession_unittest.cc
index d73bcbe..66e1cea 100644
--- a/pc/srtpsession_unittest.cc
+++ b/pc/srtpsession_unittest.cc
@@ -12,11 +12,11 @@
 
 #include <string>
 
+#include "absl/memory/memory.h"
 #include "api/fakemetricsobserver.h"
 #include "media/base/fakertp.h"
 #include "pc/srtptestutil.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/sslstreamadapter.h"  // For rtc::SRTP_*
 #include "third_party/libsrtp/include/srtp.h"
 
diff --git a/pc/srtptransport.cc b/pc/srtptransport.cc
index a1c1a8a..b2cb3aa 100644
--- a/pc/srtptransport.cc
+++ b/pc/srtptransport.cc
@@ -13,6 +13,7 @@
 #include <string>
 #include <vector>
 
+#include "absl/memory/memory.h"
 #include "media/base/rtputils.h"
 #include "pc/rtptransport.h"
 #include "pc/srtpsession.h"
@@ -20,7 +21,6 @@
 #include "rtc_base/base64.h"
 #include "rtc_base/copyonwritebuffer.h"
 #include "rtc_base/numerics/safe_conversions.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/trace_event.h"
 #include "rtc_base/zero_memory.h"
 
diff --git a/pc/srtptransport_unittest.cc b/pc/srtptransport_unittest.cc
index 5af45c8..2ac64c8 100644
--- a/pc/srtptransport_unittest.cc
+++ b/pc/srtptransport_unittest.cc
@@ -12,6 +12,7 @@
 
 #include "pc/srtptransport.h"
 
+#include "absl/memory/memory.h"
 #include "media/base/fakertp.h"
 #include "p2p/base/dtlstransportinternal.h"
 #include "p2p/base/fakepackettransport.h"
@@ -20,7 +21,6 @@
 #include "pc/srtptestutil.h"
 #include "rtc_base/asyncpacketsocket.h"
 #include "rtc_base/gunit.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/sslstreamadapter.h"
 
 using rtc::kTestKey1;
@@ -44,16 +44,16 @@
     bool rtcp_mux_enabled = true;
 
     rtp_packet_transport1_ =
-        rtc::MakeUnique<rtc::FakePacketTransport>("fake_packet_transport1");
+        absl::make_unique<rtc::FakePacketTransport>("fake_packet_transport1");
     rtp_packet_transport2_ =
-        rtc::MakeUnique<rtc::FakePacketTransport>("fake_packet_transport2");
+        absl::make_unique<rtc::FakePacketTransport>("fake_packet_transport2");
 
     bool asymmetric = false;
     rtp_packet_transport1_->SetDestination(rtp_packet_transport2_.get(),
                                            asymmetric);
 
-    srtp_transport1_ = rtc::MakeUnique<SrtpTransport>(rtcp_mux_enabled);
-    srtp_transport2_ = rtc::MakeUnique<SrtpTransport>(rtcp_mux_enabled);
+    srtp_transport1_ = absl::make_unique<SrtpTransport>(rtcp_mux_enabled);
+    srtp_transport2_ = absl::make_unique<SrtpTransport>(rtcp_mux_enabled);
 
     srtp_transport1_->SetRtpPacketTransport(rtp_packet_transport1_.get());
     srtp_transport2_->SetRtpPacketTransport(rtp_packet_transport2_.get());
diff --git a/pc/statscollector_unittest.cc b/pc/statscollector_unittest.cc
index 58fdb80..f7e30e4 100644
--- a/pc/statscollector_unittest.cc
+++ b/pc/statscollector_unittest.cc
@@ -570,7 +570,7 @@
 
   std::unique_ptr<StatsCollectorForTest> CreateStatsCollector(
       PeerConnectionInternal* pc) {
-    return rtc::MakeUnique<StatsCollectorForTest>(pc);
+    return absl::make_unique<StatsCollectorForTest>(pc);
   }
 
   void VerifyAudioTrackStats(FakeAudioTrack* audio_track,
diff --git a/pc/test/fakepeerconnectionforstats.h b/pc/test/fakepeerconnectionforstats.h
index c8cc29b..642fa01 100644
--- a/pc/test/fakepeerconnectionforstats.h
+++ b/pc/test/fakepeerconnectionforstats.h
@@ -120,9 +120,10 @@
       const std::string& mid,
       const std::string& transport_name) {
     RTC_DCHECK(!voice_channel_);
-    auto voice_media_channel = rtc::MakeUnique<FakeVoiceMediaChannelForStats>();
+    auto voice_media_channel =
+        absl::make_unique<FakeVoiceMediaChannelForStats>();
     auto* voice_media_channel_ptr = voice_media_channel.get();
-    voice_channel_ = rtc::MakeUnique<cricket::VoiceChannel>(
+    voice_channel_ = absl::make_unique<cricket::VoiceChannel>(
         worker_thread_, network_thread_, signaling_thread_, nullptr,
         std::move(voice_media_channel), mid, kDefaultSrtpRequired,
         rtc::CryptoOptions());
@@ -137,9 +138,10 @@
       const std::string& mid,
       const std::string& transport_name) {
     RTC_DCHECK(!video_channel_);
-    auto video_media_channel = rtc::MakeUnique<FakeVideoMediaChannelForStats>();
+    auto video_media_channel =
+        absl::make_unique<FakeVideoMediaChannelForStats>();
     auto video_media_channel_ptr = video_media_channel.get();
-    video_channel_ = rtc::MakeUnique<cricket::VideoChannel>(
+    video_channel_ = absl::make_unique<cricket::VideoChannel>(
         worker_thread_, network_thread_, signaling_thread_,
         std::move(video_media_channel), mid, kDefaultSrtpRequired,
         rtc::CryptoOptions());
diff --git a/pc/test/fakeperiodicvideosource.h b/pc/test/fakeperiodicvideosource.h
index 2cdd104..087deeb 100644
--- a/pc/test/fakeperiodicvideosource.h
+++ b/pc/test/fakeperiodicvideosource.h
@@ -13,10 +13,10 @@
 
 #include <memory>
 
+#include "absl/memory/memory.h"
 #include "api/video/video_source_interface.h"
 #include "media/base/fakeframesource.h"
 #include "media/base/videobroadcaster.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/task_queue.h"
 
 namespace webrtc {
@@ -38,9 +38,9 @@
   FakePeriodicVideoSource() : FakePeriodicVideoSource(Config()) {}
   explicit FakePeriodicVideoSource(Config config)
       : task_queue_(
-            rtc::MakeUnique<rtc::TaskQueue>("FakePeriodicVideoTrackSource")) {
+            absl::make_unique<rtc::TaskQueue>("FakePeriodicVideoTrackSource")) {
     thread_checker_.DetachFromThread();
-    task_queue_->PostTask(rtc::MakeUnique<FrameTask>(config, &broadcaster_));
+    task_queue_->PostTask(absl::make_unique<FrameTask>(config, &broadcaster_));
   }
 
   void RemoveSink(rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) override {
@@ -79,7 +79,7 @@
         broadcaster_->OnFrame(frame_source_.GetFrame());
       }
 
-      rtc::TaskQueue::Current()->PostDelayedTask(rtc::WrapUnique(this),
+      rtc::TaskQueue::Current()->PostDelayedTask(absl::WrapUnique(this),
                                                  frame_interval_ms_);
       return false;
     }
diff --git a/pc/test/mockpeerconnectionobservers.h b/pc/test/mockpeerconnectionobservers.h
index 147b674..6f5e9bc 100644
--- a/pc/test/mockpeerconnectionobservers.h
+++ b/pc/test/mockpeerconnectionobservers.h
@@ -20,11 +20,11 @@
 #include <utility>
 #include <vector>
 
+#include "absl/memory/memory.h"
 #include "api/datachannelinterface.h"
 #include "api/jsepicecandidate.h"
 #include "pc/streamcollection.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/ptr_util.h"
 
 namespace webrtc {
 
@@ -112,7 +112,7 @@
   void OnIceCandidate(const IceCandidateInterface* candidate) override {
     RTC_DCHECK(PeerConnectionInterface::kIceGatheringNew !=
                pc_->ice_gathering_state());
-    candidates_.push_back(rtc::MakeUnique<JsepIceCandidate>(
+    candidates_.push_back(absl::make_unique<JsepIceCandidate>(
         candidate->sdp_mid(), candidate->sdp_mline_index(),
         candidate->candidate()));
     callback_triggered_ = true;
diff --git a/pc/test/peerconnectiontestwrapper.cc b/pc/test/peerconnectiontestwrapper.cc
index 4ce13f4..145a095 100644
--- a/pc/test/peerconnectiontestwrapper.cc
+++ b/pc/test/peerconnectiontestwrapper.cc
@@ -115,7 +115,7 @@
   if (receiver->track()->kind() == MediaStreamTrackInterface::kVideoKind) {
     auto* video_track =
         static_cast<VideoTrackInterface*>(receiver->track().get());
-    renderer_ = rtc::MakeUnique<FakeVideoTrackRenderer>(video_track);
+    renderer_ = absl::make_unique<FakeVideoTrackRenderer>(video_track);
   }
 }
 
diff --git a/pc/webrtcsessiondescriptionfactory.cc b/pc/webrtcsessiondescriptionfactory.cc
index 3d89932..2255143 100644
--- a/pc/webrtcsessiondescriptionfactory.cc
+++ b/pc/webrtcsessiondescriptionfactory.cc
@@ -15,11 +15,11 @@
 #include <utility>
 #include <vector>
 
+#include "absl/memory/memory.h"
 #include "api/jsep.h"
 #include "api/jsepsessiondescription.h"
 #include "api/mediaconstraintsinterface.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/ptr_util.h"
 #include "rtc_base/sslidentity.h"
 
 using cricket::MediaSessionOptions;
@@ -343,7 +343,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 = rtc::MakeUnique<JsepSessionDescription>(SdpType::kOffer);
+  auto offer = absl::make_unique<JsepSessionDescription>(SdpType::kOffer);
   if (!offer->Initialize(desc, session_id_,
                          rtc::ToString(session_version_++))) {
     PostCreateSessionDescriptionFailed(request.observer,
@@ -396,7 +396,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 = rtc::MakeUnique<JsepSessionDescription>(SdpType::kAnswer);
+  auto answer = absl::make_unique<JsepSessionDescription>(SdpType::kAnswer);
   if (!answer->Initialize(desc, session_id_,
                           rtc::ToString(session_version_++))) {
     PostCreateSessionDescriptionFailed(request.observer,