Commit 7aeb7149 authored by tommi's avatar tommi Committed by Commit bot

Update CastStatsObserver to use the new OnComplete method.

The old method has now been deprecated so I need to TBR this to unblock a roll of WebRTC.

TBR=wez@chromium.org,aiguha@chromium.org

Review URL: https://codereview.chromium.org/804983002

Cr-Commit-Position: refs/heads/master@{#308351}
parent e1f85039
......@@ -134,18 +134,14 @@ class CastStatsObserver : public webrtc::StatsObserver {
return new rtc::RefCountedObject<CastStatsObserver>();
}
void OnComplete(const std::vector<webrtc::StatsReport>& reports) override {
typedef webrtc::StatsReport::Values::iterator ValuesIterator;
void OnComplete(const webrtc::StatsReports& reports) override {
VLOG(1) << "Received " << reports.size() << " new StatsReports.";
int index;
std::vector<webrtc::StatsReport>::const_iterator it;
for (it = reports.begin(), index = 0; it != reports.end(); ++it, ++index) {
webrtc::StatsReport::Values v = it->values;
VLOG(1) << "Report " << index << ":";
for (ValuesIterator vIt = v.begin(); vIt != v.end(); ++vIt) {
VLOG(1) << "Stat: " << vIt->name << "=" << vIt->value << ".";
int index = 0;
for (const auto* report : reports) {
VLOG(1) << "Report " << index++ << ":";
for (const auto& v : report->values) {
VLOG(1) << "Stat: " << v.display_name() << "=" << v.value << ".";
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment