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

Unified Diff: webrtc/pc/peerconnection.cc

Issue 2748253003: Pass ownership of candidate to PeerConnection::OnIceCandidate (Closed)
Patch Set: Pass ownership through std::unique_ptr Created 3 years, 9 months 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/pc/peerconnection.h ('k') | webrtc/pc/webrtcsession.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/peerconnection.cc
diff --git a/webrtc/pc/peerconnection.cc b/webrtc/pc/peerconnection.cc
index d79868d1027c540f0470dc0a5af29315932a8834..7abbb44b0bfb53720337282ff1d1c22d1647a3be 100644
--- a/webrtc/pc/peerconnection.cc
+++ b/webrtc/pc/peerconnection.cc
@@ -1702,12 +1702,13 @@ void PeerConnection::OnIceGatheringChange(
observer_->OnIceGatheringChange(ice_gathering_state_);
}
-void PeerConnection::OnIceCandidate(const IceCandidateInterface* candidate) {
+void PeerConnection::OnIceCandidate(
+ std::unique_ptr<IceCandidateInterface> candidate) {
RTC_DCHECK(signaling_thread()->IsCurrent());
if (IsClosed()) {
return;
}
- observer_->OnIceCandidate(candidate);
+ observer_->OnIceCandidate(candidate.get());
}
void PeerConnection::OnIceCandidatesRemoved(
« no previous file with comments | « webrtc/pc/peerconnection.h ('k') | webrtc/pc/webrtcsession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698