From f0f435e983808760e30469869f8ef03adc66fa2c Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Mon, 20 Mar 2023 15:46:11 +0100 Subject: [PATCH] Remove deprecated RTCStatsReport(int64) and timestamp_us MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BUG=webrtc:14813 Change-Id: I80c2ba8f57354ef63cf2cc7b767d1f64dd0dd766 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298444 Reviewed-by: Henrik Boström Reviewed-by: Danil Chapovalov Commit-Queue: Philipp Hancke Cr-Commit-Position: refs/heads/main@{#39633} --- api/stats/rtc_stats_report.h | 11 ----------- stats/rtc_stats_report.cc | 9 --------- 2 files changed, 20 deletions(-) diff --git a/api/stats/rtc_stats_report.h b/api/stats/rtc_stats_report.h index 8678eb35bf..1dce4d89b2 100644 --- a/api/stats/rtc_stats_report.h +++ b/api/stats/rtc_stats_report.h @@ -60,24 +60,13 @@ class RTC_EXPORT RTCStatsReport final StatsMap::const_iterator it_; }; - // TODO(bugs.webrtc.org/13756): deprecate this in favor of Timestamp. - // TODO(hbos): Remove "= 0" once downstream has been updated to call with a - // parameter. - ABSL_DEPRECATED("Call Create with Timestamp instead") - static rtc::scoped_refptr Create(int64_t timestamp_us = 0); static rtc::scoped_refptr Create(Timestamp timestamp); - // TODO(bugs.webrtc.org/13756): deprecate this in favor of Timestamp. - ABSL_DEPRECATED("Use constructor with Timestamp instead") - explicit RTCStatsReport(int64_t timestamp_us); explicit RTCStatsReport(Timestamp timestamp); RTCStatsReport(const RTCStatsReport& other) = delete; rtc::scoped_refptr Copy() const; - // TODO(bugs.webrtc.org/13756): deprecate this in favor of Timestamp. - ABSL_DEPRECATED("Call timestamp() instead") - int64_t timestamp_us() const { return timestamp_.us_or(-1); } Timestamp timestamp() const { return timestamp_; } void AddStats(std::unique_ptr stats); // On success, returns a non-owning pointer to `stats`. If the stats ID is not diff --git a/stats/rtc_stats_report.cc b/stats/rtc_stats_report.cc index e6885dc020..404549135b 100644 --- a/stats/rtc_stats_report.cc +++ b/stats/rtc_stats_report.cc @@ -54,19 +54,10 @@ bool RTCStatsReport::ConstIterator::operator!=( return !(*this == other); } -rtc::scoped_refptr RTCStatsReport::Create( - int64_t timestamp_us) { - return rtc::scoped_refptr( - new RTCStatsReport(Timestamp::Micros(timestamp_us))); -} - rtc::scoped_refptr RTCStatsReport::Create(Timestamp timestamp) { return rtc::scoped_refptr(new RTCStatsReport(timestamp)); } -RTCStatsReport::RTCStatsReport(int64_t timestamp_us) - : RTCStatsReport(Timestamp::Micros(timestamp_us)) {} - RTCStatsReport::RTCStatsReport(Timestamp timestamp) : timestamp_(timestamp) {} rtc::scoped_refptr RTCStatsReport::Copy() const {