aboutsummaryrefslogtreecommitdiff
path: root/api/stats/rtc_stats_report.h
diff options
context:
space:
mode:
Diffstat (limited to 'api/stats/rtc_stats_report.h')
-rw-r--r--api/stats/rtc_stats_report.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/api/stats/rtc_stats_report.h b/api/stats/rtc_stats_report.h
index 94bd813b07..0fe5ce91f9 100644
--- a/api/stats/rtc_stats_report.h
+++ b/api/stats/rtc_stats_report.h
@@ -19,9 +19,11 @@
#include <string>
#include <vector>
+#include "api/ref_counted_base.h"
#include "api/scoped_refptr.h"
#include "api/stats/rtc_stats.h"
-#include "rtc_base/ref_count.h"
+// TODO(tommi): Remove this include after fixing iwyu issue in chromium.
+// See: third_party/blink/renderer/platform/peerconnection/rtc_stats.cc
#include "rtc_base/ref_counted_object.h"
#include "rtc_base/system/rtc_export.h"
@@ -29,7 +31,8 @@ namespace webrtc {
// A collection of stats.
// This is accessible as a map from |RTCStats::id| to |RTCStats|.
-class RTC_EXPORT RTCStatsReport : public rtc::RefCountInterface {
+class RTC_EXPORT RTCStatsReport final
+ : public rtc::RefCountedNonVirtual<RTCStatsReport> {
public:
typedef std::map<std::string, std::unique_ptr<const RTCStats>> StatsMap;
@@ -107,11 +110,11 @@ class RTC_EXPORT RTCStatsReport : public rtc::RefCountInterface {
// listing all of its stats objects.
std::string ToJson() const;
- friend class rtc::RefCountedObject<RTCStatsReport>;
+ protected:
+ friend class rtc::RefCountedNonVirtual<RTCStatsReport>;
+ ~RTCStatsReport() = default;
private:
- ~RTCStatsReport() override;
-
int64_t timestamp_us_;
StatsMap stats_;
};