diff options
Diffstat (limited to 'pc/connection_context.h')
-rw-r--r-- | pc/connection_context.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pc/connection_context.h b/pc/connection_context.h index 0c69c17a5b..8fad13c10c 100644 --- a/pc/connection_context.h +++ b/pc/connection_context.h @@ -17,6 +17,7 @@ #include "api/call/call_factory_interface.h" #include "api/media_stream_interface.h" #include "api/peer_connection_interface.h" +#include "api/ref_counted_base.h" #include "api/scoped_refptr.h" #include "api/sequence_checker.h" #include "api/transport/sctp_transport_factory_interface.h" @@ -27,7 +28,6 @@ #include "rtc_base/checks.h" #include "rtc_base/network.h" #include "rtc_base/network_monitor_factory.h" -#include "rtc_base/ref_count.h" #include "rtc_base/rtc_certificate_generator.h" #include "rtc_base/thread.h" #include "rtc_base/thread_annotations.h" @@ -47,7 +47,8 @@ class RtcEventLog; // interferes with the operation of other PeerConnections. // // This class must be created and destroyed on the signaling thread. -class ConnectionContext : public rtc::RefCountInterface { +class ConnectionContext final + : public rtc::RefCountedNonVirtual<ConnectionContext> { public: // Creates a ConnectionContext. May return null if initialization fails. // The Dependencies class allows simple management of all new dependencies @@ -92,7 +93,8 @@ class ConnectionContext : public rtc::RefCountInterface { protected: explicit ConnectionContext(PeerConnectionFactoryDependencies* dependencies); - virtual ~ConnectionContext(); + friend class rtc::RefCountedNonVirtual<ConnectionContext>; + ~ConnectionContext(); private: // The following three variables are used to communicate between the |