Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Unified Diff: webrtc/api/rtcstatsreport.h

Issue 2278433003: RTCStatsReport: Take ownership of other's stats with TakeMembersFrom (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added comment Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/stats/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/rtcstatsreport.h
diff --git a/webrtc/api/rtcstatsreport.h b/webrtc/api/rtcstatsreport.h
index 42237eba725ce687ab7dc01300e848c0e6004a5b..fbd78b93f4e970ff0ca43c737404f4bfa6a18a2d 100644
--- a/webrtc/api/rtcstatsreport.h
+++ b/webrtc/api/rtcstatsreport.h
@@ -55,9 +55,13 @@ class RTCStatsReport : public rtc::RefCountInterface {
RTCStatsReport(const RTCStatsReport& other) = delete;
bool AddStats(std::unique_ptr<const RTCStats> stats);
- const RTCStats* operator[](const std::string& id) const;
+ const RTCStats* Get(const std::string& id) const;
size_t size() const { return stats_.size(); }
+ // Takes ownership of all the stats in |victim|, leaving it empty.
+ void TakeMembersFrom(rtc::scoped_refptr<RTCStatsReport> victim);
+
+ // Stats iterators. Stats are ordered lexicographically on |RTCStats::id|.
ConstIterator begin() const;
ConstIterator end() const;
« no previous file with comments | « no previous file | webrtc/stats/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698