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

Unified Diff: webrtc/api/peerconnection.cc

Issue 2584553002: New method StatsObserver::OnCompleteReports, passing ownership. (Closed)
Patch Set: Drop unneeded ".get()". 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 | « no previous file | webrtc/api/peerconnectioninterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnection.cc
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index ebce40ca5eb0cf37d03243663826ea911eda06c3..08a8b0d41dceef2d3e3178a86700ff66593e13dc 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -1441,9 +1441,9 @@ void PeerConnection::OnMessage(rtc::Message* msg) {
}
case MSG_GETSTATS: {
GetStatsMsg* param = static_cast<GetStatsMsg*>(msg->pdata);
- StatsReports reports;
- stats_->GetStats(param->track, &reports);
- param->observer->OnComplete(reports);
+ std::unique_ptr<StatsReports> reports(new StatsReports);
+ stats_->GetStats(param->track, reports.get());
+ param->observer->OnCompleteReports(std::move(reports));
delete param;
break;
}
« no previous file with comments | « no previous file | webrtc/api/peerconnectioninterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698