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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « webrtc/pc/peerconnection.h ('k') | webrtc/pc/webrtcsession.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 void PeerConnection::OnIceGatheringChange( 1695 void PeerConnection::OnIceGatheringChange(
1696 PeerConnectionInterface::IceGatheringState new_state) { 1696 PeerConnectionInterface::IceGatheringState new_state) {
1697 RTC_DCHECK(signaling_thread()->IsCurrent()); 1697 RTC_DCHECK(signaling_thread()->IsCurrent());
1698 if (IsClosed()) { 1698 if (IsClosed()) {
1699 return; 1699 return;
1700 } 1700 }
1701 ice_gathering_state_ = new_state; 1701 ice_gathering_state_ = new_state;
1702 observer_->OnIceGatheringChange(ice_gathering_state_); 1702 observer_->OnIceGatheringChange(ice_gathering_state_);
1703 } 1703 }
1704 1704
1705 void PeerConnection::OnIceCandidate(const IceCandidateInterface* candidate) { 1705 void PeerConnection::OnIceCandidate(
1706 std::unique_ptr<IceCandidateInterface> candidate) {
1706 RTC_DCHECK(signaling_thread()->IsCurrent()); 1707 RTC_DCHECK(signaling_thread()->IsCurrent());
1707 if (IsClosed()) { 1708 if (IsClosed()) {
1708 return; 1709 return;
1709 } 1710 }
1710 observer_->OnIceCandidate(candidate); 1711 observer_->OnIceCandidate(candidate.get());
1711 } 1712 }
1712 1713
1713 void PeerConnection::OnIceCandidatesRemoved( 1714 void PeerConnection::OnIceCandidatesRemoved(
1714 const std::vector<cricket::Candidate>& candidates) { 1715 const std::vector<cricket::Candidate>& candidates) {
1715 RTC_DCHECK(signaling_thread()->IsCurrent()); 1716 RTC_DCHECK(signaling_thread()->IsCurrent());
1716 if (IsClosed()) { 1717 if (IsClosed()) {
1717 return; 1718 return;
1718 } 1719 }
1719 observer_->OnIceCandidatesRemoved(candidates); 1720 observer_->OnIceCandidatesRemoved(candidates);
1720 } 1721 }
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
2584 } 2585 }
2585 return event_log_->StartLogging(file, max_size_bytes); 2586 return event_log_->StartLogging(file, max_size_bytes);
2586 } 2587 }
2587 2588
2588 void PeerConnection::StopRtcEventLog_w() { 2589 void PeerConnection::StopRtcEventLog_w() {
2589 if (event_log_) { 2590 if (event_log_) {
2590 event_log_->StopLogging(); 2591 event_log_->StopLogging();
2591 } 2592 }
2592 } 2593 }
2593 } // namespace webrtc 2594 } // namespace webrtc
OLDNEW
« 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