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

Unified Diff: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
index 0467f453ddb6a74f46e8bff4698283804afe146b..a421337bda3627f12b72e769612b78abc9b2fb1c 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
@@ -90,7 +90,7 @@
#include "public/platform/WebRTCStatsRequest.h"
#include "public/platform/WebRTCVoidRequest.h"
#include "wtf/CurrentTime.h"
-
+#include "wtf/PtrUtil.h"
#include <memory>
namespace blink {
@@ -455,7 +455,7 @@ RTCPeerConnection::RTCPeerConnection(ExecutionContext* context, RTCConfiguration
return;
}
- m_peerHandler = adoptPtr(Platform::current()->createRTCPeerConnectionHandler(this));
+ m_peerHandler = wrapUnique(Platform::current()->createRTCPeerConnectionHandler(this));
if (!m_peerHandler) {
m_closed = true;
m_stopped = true;
@@ -747,7 +747,7 @@ ScriptPromise RTCPeerConnection::generateCertificate(ScriptState* scriptState, c
}
DCHECK(!keyParams.isNull());
- OwnPtr<WebRTCCertificateGenerator> certificateGenerator = adoptPtr(
+ std::unique_ptr<WebRTCCertificateGenerator> certificateGenerator = wrapUnique(
Platform::current()->createRTCCertificateGenerator());
// |keyParams| was successfully constructed, but does the certificate generator support these parameters?
@@ -1102,7 +1102,7 @@ void RTCPeerConnection::didAddRemoteDataChannel(WebRTCDataChannelHandler* handle
if (m_signalingState == SignalingStateClosed)
return;
- RTCDataChannel* channel = RTCDataChannel::create(getExecutionContext(), adoptPtr(handler));
+ RTCDataChannel* channel = RTCDataChannel::create(getExecutionContext(), wrapUnique(handler));
scheduleDispatchEvent(RTCDataChannelEvent::create(EventTypeNames::datachannel, false, false, channel));
}

Powered by Google App Engine
This is Rietveld 408576698