Delete unused method PacedSender::QueueSizePackets

Corresponding mock class is deleted rather than updated,
since it appears unused.

Bug: webrtc:8422
Change-Id: If1c6c5ed73abff0d2545e8666c4bb8b63ee5b53f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/13862
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29505}
diff --git a/call/BUILD.gn b/call/BUILD.gn
index 48a6504..9db341b 100644
--- a/call/BUILD.gn
+++ b/call/BUILD.gn
@@ -399,7 +399,6 @@
       "../modules/audio_processing:mocks",
       "../modules/congestion_controller",
       "../modules/pacing",
-      "../modules/pacing:mock_paced_sender",
       "../modules/rtp_rtcp",
       "../modules/rtp_rtcp:mock_rtp_rtcp",
       "../modules/rtp_rtcp:rtp_rtcp_format",
diff --git a/call/call_unittest.cc b/call/call_unittest.cc
index 248a96a..cf2037e 100644
--- a/call/call_unittest.cc
+++ b/call/call_unittest.cc
@@ -26,7 +26,6 @@
 #include "call/audio_state.h"
 #include "modules/audio_device/include/mock_audio_device.h"
 #include "modules/audio_processing/include/mock_audio_processing.h"
-#include "modules/pacing/mock/mock_paced_sender.h"
 #include "modules/rtp_rtcp/include/rtp_rtcp.h"
 #include "test/fake_encoder.h"
 #include "test/gtest.h"
diff --git a/modules/congestion_controller/rtp/BUILD.gn b/modules/congestion_controller/rtp/BUILD.gn
index d3e995e..77990b2 100644
--- a/modules/congestion_controller/rtp/BUILD.gn
+++ b/modules/congestion_controller/rtp/BUILD.gn
@@ -84,7 +84,6 @@
       "../../../test:field_trial",
       "../../../test:test_support",
       "../../pacing",
-      "../../pacing:mock_paced_sender",
       "../../remote_bitrate_estimator",
       "../../rtp_rtcp:rtp_rtcp_format",
       "//testing/gmock",
diff --git a/modules/pacing/BUILD.gn b/modules/pacing/BUILD.gn
index edd5c70..816cec8 100644
--- a/modules/pacing/BUILD.gn
+++ b/modules/pacing/BUILD.gn
@@ -98,16 +98,4 @@
       "../rtp_rtcp:rtp_rtcp_format",
     ]
   }
-
-  rtc_source_set("mock_paced_sender") {
-    testonly = true
-    sources = [
-      "mock/mock_paced_sender.h",
-    ]
-    deps = [
-      ":pacing",
-      "../../system_wrappers",
-      "../../test:test_support",
-    ]
-  }
 }
diff --git a/modules/pacing/mock/mock_paced_sender.h b/modules/pacing/mock/mock_paced_sender.h
deleted file mode 100644
index b09b284..0000000
--- a/modules/pacing/mock/mock_paced_sender.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef MODULES_PACING_MOCK_MOCK_PACED_SENDER_H_
-#define MODULES_PACING_MOCK_MOCK_PACED_SENDER_H_
-
-#include <memory>
-#include <vector>
-
-#include "modules/pacing/paced_sender.h"
-#include "system_wrappers/include/clock.h"
-#include "test/gmock.h"
-
-namespace webrtc {
-
-class MockPacedSender : public PacedSender {
- public:
-  MockPacedSender()
-      : PacedSender(Clock::GetRealTimeClock(), nullptr, nullptr) {}
-  MOCK_METHOD1(EnqueuePackets,
-               void(std::vector<std::unique_ptr<RtpPacketToSend>> packet));
-  MOCK_METHOD2(CreateProbeCluster, void(DataRate, int));
-  MOCK_METHOD2(SetPacingRates, void(DataRate, DataRate));
-  MOCK_CONST_METHOD0(OldestPacketWaitTime, TimeDelta());
-  MOCK_CONST_METHOD0(QueueSizePackets, size_t());
-  MOCK_CONST_METHOD0(ExpectedQueueTime, TimeDelta());
-  MOCK_METHOD0(Process, void());
-};
-
-}  // namespace webrtc
-
-#endif  // MODULES_PACING_MOCK_MOCK_PACED_SENDER_H_
diff --git a/modules/pacing/paced_sender.cc b/modules/pacing/paced_sender.cc
index 9326de0..0579b8e 100644
--- a/modules/pacing/paced_sender.cc
+++ b/modules/pacing/paced_sender.cc
@@ -109,11 +109,6 @@
   return pacing_controller_.ExpectedQueueTime();
 }
 
-size_t PacedSender::QueueSizePackets() const {
-  rtc::CritScope cs(&critsect_);
-  return pacing_controller_.QueueSizePackets();
-}
-
 DataSize PacedSender::QueueSizeData() const {
   rtc::CritScope cs(&critsect_);
   return pacing_controller_.QueueSizeData();
diff --git a/modules/pacing/paced_sender.h b/modules/pacing/paced_sender.h
index b7a3b9b..f28cb63 100644
--- a/modules/pacing/paced_sender.h
+++ b/modules/pacing/paced_sender.h
@@ -100,7 +100,6 @@
   // Returns the time since the oldest queued packet was enqueued.
   TimeDelta OldestPacketWaitTime() const override;
 
-  size_t QueueSizePackets() const override;
   DataSize QueueSizeData() const override;
 
   // Returns the time when the first packet was sent;
diff --git a/modules/pacing/rtp_packet_pacer.h b/modules/pacing/rtp_packet_pacer.h
index b344705..305be54 100644
--- a/modules/pacing/rtp_packet_pacer.h
+++ b/modules/pacing/rtp_packet_pacer.h
@@ -43,9 +43,6 @@
   // Time since the oldest packet currently in the queue was added.
   virtual TimeDelta OldestPacketWaitTime() const = 0;
 
-  // Current number of packets curently in the pacer queue.
-  virtual size_t QueueSizePackets() const = 0;
-
   // Sum of payload + padding bytes of all packets currently in the pacer queue.
   virtual DataSize QueueSizeData() const = 0;