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

Unified Diff: remoting/host/cast_extension_session.cc

Issue 804983002: Update CastStatsObserver to use the new OnComplete method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/cast_extension_session.cc
diff --git a/remoting/host/cast_extension_session.cc b/remoting/host/cast_extension_session.cc
index 9d519800bfb3286ec1aad34c5db0b4267c2d6f64..140b41d3baeda2425ccafd49245473b9ea449170 100644
--- a/remoting/host/cast_extension_session.cc
+++ b/remoting/host/cast_extension_session.cc
@@ -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 << ".";
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698