summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/api/stats/rtc_stats.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/libwebrtc/api/stats/rtc_stats.h
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/api/stats/rtc_stats.h')
-rw-r--r--third_party/libwebrtc/api/stats/rtc_stats.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/third_party/libwebrtc/api/stats/rtc_stats.h b/third_party/libwebrtc/api/stats/rtc_stats.h
index edd293f5c9..74e7fc4d8e 100644
--- a/third_party/libwebrtc/api/stats/rtc_stats.h
+++ b/third_party/libwebrtc/api/stats/rtc_stats.h
@@ -20,8 +20,8 @@
#include <utility>
#include <vector>
+#include "absl/types/optional.h"
#include "api/stats/attribute.h"
-#include "api/stats/rtc_stats_member.h"
#include "api/units/timestamp.h"
#include "rtc_base/checks.h"
#include "rtc_base/system/rtc_export.h"
@@ -39,8 +39,8 @@ namespace webrtc {
// Use the `WEBRTC_RTCSTATS_IMPL` macro when implementing subclasses, see macro
// for details.
//
-// Derived classes list their dictionary attributes (RTCStatsMember<T> to soon
-// be replaced by absl::optional<T>) as public fields, allowing the following:
+// Derived classes list their dictionary attributes, absl::optional<T>, as
+// public fields, allowing the following:
//
// RTCFooStats foo("fooId", Timestamp::Micros(GetCurrentTime()));
// foo.bar = 42;
@@ -52,7 +52,7 @@ namespace webrtc {
// iteration:
//
// for (const auto& attribute : foo.Attributes()) {
-// printf("%s = %s\n", attribute.name(), attribute.ValueToString().c_str());
+// printf("%s = %s\n", attribute.name(), attribute.ToString().c_str());
// }
class RTC_EXPORT RTCStats {
public:
@@ -73,12 +73,12 @@ class RTC_EXPORT RTCStats {
// metrics as viewed via the Attribute wrapper.
std::vector<Attribute> Attributes() const;
template <typename T>
- Attribute GetAttribute(const RTCStatsMember<T>& stat) const {
+ Attribute GetAttribute(const absl::optional<T>& stat) const {
for (const auto& attribute : Attributes()) {
if (!attribute.holds_alternative<T>()) {
continue;
}
- if (absl::get<const RTCStatsMember<T>*>(attribute.as_variant()) ==
+ if (absl::get<const absl::optional<T>*>(attribute.as_variant()) ==
&stat) {
return attribute;
}
@@ -136,8 +136,8 @@ class RTC_EXPORT RTCStats {
//
// RTCFooStats(const std::string& id, Timestamp timestamp);
//
-// RTCStatsMember<int32_t> foo;
-// RTCStatsMember<int32_t> bar;
+// absl::optional<int32_t> foo;
+// absl::optional<int32_t> bar;
// };
//
// rtcfoostats.cc: