Revert "Make MockPeerConnectionInterface not inherit from RefCountedObject"
This reverts commit d67903d284353dffcf28dfb92819e3d7c4b69bfd.
Reason for revert: A downstream issue needs to be fixed.
Original change's description:
> Make MockPeerConnectionInterface not inherit from RefCountedObject
>
> Bug: webrtc:12701
> Change-Id: I51fb7caf12b97d70f35af12703104112f9fdfaff
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256107
> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36267}
Bug: webrtc:12701
Change-Id: I25e2d6004d257dd0b1d17fb1f7726d04d29e6eed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256109
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36271}
diff --git a/api/test/mock_peerconnectioninterface.h b/api/test/mock_peerconnectioninterface.h
index adc09f9..effd24e 100644
--- a/api/test/mock_peerconnectioninterface.h
+++ b/api/test/mock_peerconnectioninterface.h
@@ -25,7 +25,8 @@
namespace webrtc {
-class MockPeerConnectionInterface : public PeerConnectionInterface {
+class MockPeerConnectionInterface
+ : public rtc::RefCountedObject<webrtc::PeerConnectionInterface> {
public:
static rtc::scoped_refptr<MockPeerConnectionInterface> Create() {
return rtc::make_ref_counted<MockPeerConnectionInterface>();
@@ -198,9 +199,7 @@
MOCK_METHOD(void, Close, (), (override));
};
-static_assert(!std::is_abstract<
- rtc::RefCountedObject<MockPeerConnectionInterface>>::value,
- "");
+static_assert(!std::is_abstract<MockPeerConnectionInterface>::value, "");
} // namespace webrtc