Replace more instances of rtc::RefCountedObject with make_ref_counted.
This is essentially replacing `new rtc::RefCountedObject` with
`rtc::make_ref_counted` in many files. In a couple of places I
made minor tweaks to make things compile such as adding parenthesis
when they were missing.
Bug: webrtc:12701
Change-Id: I3828dbf3ee0eb0232f3a47067474484ac2f4aed2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215973
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33852}
diff --git a/pc/proxy_unittest.cc b/pc/proxy_unittest.cc
index fdc7dc3..f59250d 100644
--- a/pc/proxy_unittest.cc
+++ b/pc/proxy_unittest.cc
@@ -43,7 +43,7 @@
class Fake : public FakeInterface {
public:
static rtc::scoped_refptr<Fake> Create() {
- return new rtc::RefCountedObject<Fake>();
+ return rtc::make_ref_counted<Fake>();
}
// Used to verify destructor is called on the correct thread.
MOCK_METHOD(void, Destroy, ());