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

Unified Diff: webrtc/api/statscollector.cc

Issue 2583883002: RTCStatsCollector: Utilize network thread to minimize thread hops. (Closed)
Patch Set: Addressed comments Created 4 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 | « webrtc/api/rtcstatscollector_unittest.cc ('k') | webrtc/api/statscollector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/statscollector.cc
diff --git a/webrtc/api/statscollector.cc b/webrtc/api/statscollector.cc
index 991ceb4fa4a5b69017f00be835f9ee186bcdd880..fb6583ab91938b1876f5fd1f6c483a548bfb9923 100644
--- a/webrtc/api/statscollector.cc
+++ b/webrtc/api/statscollector.cc
@@ -675,8 +675,8 @@ void StatsCollector::ExtractSessionInfo() {
report->AddBoolean(StatsReport::kStatsValueNameInitiator,
pc_->session()->initial_offerer());
- SessionStats stats;
- if (!pc_->session()->GetTransportStats(&stats)) {
+ std::unique_ptr<SessionStats> stats = pc_->session()->GetStats_s();
+ if (!stats) {
return;
}
@@ -686,9 +686,9 @@ void StatsCollector::ExtractSessionInfo() {
// the proxy map directly from the session stats.
// As is, if GetStats() failed, we could be using old (incorrect?) proxy
// data.
- proxy_to_transport_ = stats.proxy_to_transport;
+ proxy_to_transport_ = stats->proxy_to_transport;
- for (const auto& transport_iter : stats.transport_stats) {
+ for (const auto& transport_iter : stats->transport_stats) {
// Attempt to get a copy of the certificates from the transport and
// expose them in stats reports. All channels in a transport share the
// same local and remote certificates.
« no previous file with comments | « webrtc/api/rtcstatscollector_unittest.cc ('k') | webrtc/api/statscollector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698