Remove unused AsyncPacketSocket::NotifyPacketReceived

Bug: webrtc:15368
Change-Id: Icb1d566670442604172fa1c03fc77e75ab9fde1f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340144
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41789}
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 2cf9c11..4a0427b 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -1385,6 +1385,7 @@
     deps = [
       ":async_packet_socket",
       ":gunit_helpers",
+      ":socket_address",
       "../test:test_support",
       "network:received_packet",
       "third_party/sigslot",
diff --git a/rtc_base/async_packet_socket.h b/rtc_base/async_packet_socket.h
index 740c0bb..8523a0b 100644
--- a/rtc_base/async_packet_socket.h
+++ b/rtc_base/async_packet_socket.h
@@ -151,16 +151,6 @@
     on_close_.Send(this, err);
   }
 
-  // TODO(bugs.webrtc.org:15368): Deprecate and remove.
-  void NotifyPacketReceived(AsyncPacketSocket*,
-                            const char* data,
-                            size_t size,
-                            const SocketAddress& address,
-                            const int64_t& packet_time_us) {
-    NotifyPacketReceived(
-        ReceivedPacket::CreateFromLegacy(data, size, packet_time_us, address));
-  }
-
   void NotifyPacketReceived(const rtc::ReceivedPacket& packet);
 
   RTC_NO_UNIQUE_ADDRESS webrtc::SequenceChecker network_checker_{
diff --git a/rtc_base/async_packet_socket_unittest.cc b/rtc_base/async_packet_socket_unittest.cc
index 1d66821..ce9f2c3 100644
--- a/rtc_base/async_packet_socket_unittest.cc
+++ b/rtc_base/async_packet_socket_unittest.cc
@@ -10,6 +10,7 @@
 
 #include "rtc_base/async_packet_socket.h"
 
+#include "rtc_base/socket_address.h"
 #include "rtc_base/third_party/sigslot/sigslot.h"
 #include "test/gmock.h"
 #include "test/gtest.h"
@@ -47,10 +48,7 @@
   MOCK_METHOD(int, GetError, (), (const, override));
   MOCK_METHOD(void, SetError, (int error), (override));
 
-  void NotifyPacketReceived() {
-    char data[1] = {'a'};
-    AsyncPacketSocket::NotifyPacketReceived(this, data, 1, SocketAddress(), -1);
-  }
+  using AsyncPacketSocket::NotifyPacketReceived;
 };
 
 TEST(AsyncPacketSocket, RegisteredCallbackReceivePacketsFromNotify) {
@@ -60,7 +58,7 @@
 
   EXPECT_CALL(received_packet, Call);
   mock_socket.RegisterReceivedPacketCallback(received_packet.AsStdFunction());
-  mock_socket.NotifyPacketReceived();
+  mock_socket.NotifyPacketReceived(ReceivedPacket({}, SocketAddress()));
 }
 
 }  // namespace