| Index: webrtc/stats/rtcstatsreport.cc
|
| diff --git a/webrtc/stats/rtcstatsreport.cc b/webrtc/stats/rtcstatsreport.cc
|
| index 870651d2dfc52b1afff2bda5f227ee57274c34ed..00a55f41fc7e03d83c5ae7e08c8d1334e4d0e9cd 100644
|
| --- a/webrtc/stats/rtcstatsreport.cc
|
| +++ b/webrtc/stats/rtcstatsreport.cc
|
| @@ -66,13 +66,22 @@ bool RTCStatsReport::AddStats(std::unique_ptr<const RTCStats> stats) {
|
| std::move(stats))).second;
|
| }
|
|
|
| -const RTCStats* RTCStatsReport::operator[](const std::string& id) const {
|
| +const RTCStats* RTCStatsReport::Get(const std::string& id) const {
|
| StatsMap::const_iterator it = stats_.find(id);
|
| if (it != stats_.cend())
|
| return it->second.get();
|
| return nullptr;
|
| }
|
|
|
| +void RTCStatsReport::TakeMembersFrom(
|
| + rtc::scoped_refptr<RTCStatsReport> victim) {
|
| + for (StatsMap::iterator it = victim->stats_.begin();
|
| + it != victim->stats_.end(); ++it) {
|
| + AddStats(std::unique_ptr<const RTCStats>(it->second.release()));
|
| + }
|
| + victim->stats_.clear();
|
| +}
|
| +
|
| RTCStatsReport::ConstIterator RTCStatsReport::begin() const {
|
| return ConstIterator(rtc::scoped_refptr<const RTCStatsReport>(this),
|
| stats_.cbegin());
|
|
|