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

Unified Diff: webrtc/api/peerconnection.cc

Issue 1930463002: Replace scoped_ptr with unique_ptr in webrtc/api/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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/api/peerconnection.h ('k') | webrtc/api/peerconnection_unittest.cc » ('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 70a386ec14f8905382893b266589b17afefc5456..7f1f4523781685f062bfa0f7e8b639fd1cc1b8d4 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -526,8 +526,8 @@ PeerConnection::~PeerConnection() {
bool PeerConnection::Initialize(
const PeerConnectionInterface::RTCConfiguration& configuration,
- rtc::scoped_ptr<cricket::PortAllocator> allocator,
- rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
+ std::unique_ptr<cricket::PortAllocator> allocator,
+ std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store,
PeerConnectionObserver* observer) {
TRACE_EVENT0("webrtc", "PeerConnection::Initialize");
RTC_DCHECK(observer != nullptr);
@@ -628,7 +628,7 @@ bool PeerConnection::AddStream(MediaStreamInterface* local_stream) {
&PeerConnection::OnVideoTrackAdded);
observer->SignalVideoTrackRemoved.connect(
this, &PeerConnection::OnVideoTrackRemoved);
- stream_observers_.push_back(rtc::scoped_ptr<MediaStreamObserver>(observer));
+ stream_observers_.push_back(std::unique_ptr<MediaStreamObserver>(observer));
for (const auto& track : local_stream->GetAudioTracks()) {
OnAudioTrackAdded(track.get(), local_stream);
@@ -655,7 +655,7 @@ void PeerConnection::RemoveStream(MediaStreamInterface* local_stream) {
stream_observers_.erase(
std::remove_if(
stream_observers_.begin(), stream_observers_.end(),
- [local_stream](const rtc::scoped_ptr<MediaStreamObserver>& observer) {
+ [local_stream](const std::unique_ptr<MediaStreamObserver>& observer) {
return observer->stream()->label().compare(local_stream->label()) ==
0;
}),
@@ -835,7 +835,7 @@ PeerConnection::CreateDataChannel(
TRACE_EVENT0("webrtc", "PeerConnection::CreateDataChannel");
bool first_datachannel = !HasDataChannels();
- rtc::scoped_ptr<InternalDataChannelInit> internal_config;
+ std::unique_ptr<InternalDataChannelInit> internal_config;
if (config) {
internal_config.reset(new InternalDataChannelInit(*config));
}
« no previous file with comments | « webrtc/api/peerconnection.h ('k') | webrtc/api/peerconnection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698