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

Unified Diff: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm

Issue 1937693002: Replace scoped_ptr with unique_ptr everywhere (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@unique5
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
Index: webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
diff --git a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
index 46ea52a8f643b5bfaa5db49703e2dfe10677330e..3b7632c2b90eb1a73405c5cf64e34d485718d3ff 100644
--- a/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
+++ b/webrtc/sdk/objc/Framework/Classes/RTCPeerConnection.mm
@@ -22,6 +22,8 @@
#import "RTCStatsReport+Private.h"
#import "WebRTC/RTCLogging.h"
+#include <memory>
+
#include "webrtc/base/checks.h"
NSString * const kRTCPeerConnectionErrorDomain =
@@ -45,8 +47,8 @@ class CreateSessionDescriptionObserverAdapter
void OnSuccess(SessionDescriptionInterface *desc) override {
RTC_DCHECK(completion_handler_);
- rtc::scoped_ptr<webrtc::SessionDescriptionInterface> description =
- rtc::scoped_ptr<webrtc::SessionDescriptionInterface>(desc);
+ std::unique_ptr<webrtc::SessionDescriptionInterface> description =
+ std::unique_ptr<webrtc::SessionDescriptionInterface>(desc);
RTCSessionDescription* session =
[[RTCSessionDescription alloc] initWithNativeDescription:
description.get()];
@@ -184,7 +186,7 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
@implementation RTCPeerConnection {
NSMutableArray *_localStreams;
- rtc::scoped_ptr<webrtc::PeerConnectionDelegateAdapter> _observer;
+ std::unique_ptr<webrtc::PeerConnectionDelegateAdapter> _observer;
rtc::scoped_refptr<webrtc::PeerConnectionInterface> _peerConnection;
}
@@ -199,7 +201,7 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
_observer.reset(new webrtc::PeerConnectionDelegateAdapter(self));
webrtc::PeerConnectionInterface::RTCConfiguration config =
configuration.nativeConfiguration;
- rtc::scoped_ptr<webrtc::MediaConstraints> nativeConstraints =
+ std::unique_ptr<webrtc::MediaConstraints> nativeConstraints =
constraints.nativeConstraints;
_peerConnection =
factory.nativeFactory->CreatePeerConnection(config,
@@ -257,7 +259,7 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
}
- (void)addIceCandidate:(RTCIceCandidate *)candidate {
- rtc::scoped_ptr<const webrtc::IceCandidateInterface> iceCandidate(
+ std::unique_ptr<const webrtc::IceCandidateInterface> iceCandidate(
candidate.nativeCandidate);
_peerConnection->AddIceCandidate(iceCandidate.get());
}

Powered by Google App Engine
This is Rietveld 408576698