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

Unified Diff: webrtc/api/peerconnectionfactory_unittest.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/peerconnectionfactory.cc ('k') | webrtc/api/peerconnectionfactoryproxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnectionfactory_unittest.cc
diff --git a/webrtc/api/peerconnectionfactory_unittest.cc b/webrtc/api/peerconnectionfactory_unittest.cc
index 254e4e0a02524d12ae81862509903497a8d4c219..e7859d0081a87cff1ddddc4abb2a54ddf43c3736 100644
--- a/webrtc/api/peerconnectionfactory_unittest.cc
+++ b/webrtc/api/peerconnectionfactory_unittest.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <memory>
#include <string>
#include <utility>
@@ -19,7 +20,6 @@
#include "webrtc/api/test/fakedtlsidentitystore.h"
#include "webrtc/api/test/fakevideotrackrenderer.h"
#include "webrtc/base/gunit.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread.h"
#include "webrtc/media/base/fakevideocapturer.h"
#include "webrtc/media/engine/webrtccommon.h"
@@ -122,7 +122,7 @@ class PeerConnectionFactoryTest : public testing::Test {
rtc::scoped_refptr<PeerConnectionFactoryInterface> factory_;
NullPeerConnectionObserver observer_;
- rtc::scoped_ptr<cricket::FakePortAllocator> port_allocator_;
+ std::unique_ptr<cricket::FakePortAllocator> port_allocator_;
// Since the PC owns the port allocator after it's been initialized,
// this should only be used when known to be safe.
cricket::FakePortAllocator* raw_port_allocator_;
@@ -141,7 +141,7 @@ TEST(PeerConnectionFactoryTestInternal, CreatePCUsingInternalModules) {
NullPeerConnectionObserver observer;
webrtc::PeerConnectionInterface::RTCConfiguration config;
- rtc::scoped_ptr<FakeDtlsIdentityStore> dtls_identity_store(
+ std::unique_ptr<FakeDtlsIdentityStore> dtls_identity_store(
new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(factory->CreatePeerConnection(
config, nullptr, nullptr, std::move(dtls_identity_store), &observer));
@@ -162,7 +162,7 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIceServers) {
ice_server.uri = kTurnIceServerWithTransport;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
- rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(factory_->CreatePeerConnection(
config, nullptr, std::move(port_allocator_),
@@ -192,7 +192,7 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIceServersUrls) {
ice_server.urls.push_back(kTurnIceServerWithTransport);
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
- rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(factory_->CreatePeerConnection(
config, nullptr, std::move(port_allocator_),
@@ -221,7 +221,7 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingNoUsernameInUri) {
ice_server.username = kTurnUsername;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
- rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(factory_->CreatePeerConnection(
config, nullptr, std::move(port_allocator_),
@@ -242,7 +242,7 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingTurnUrlWithTransportParam) {
ice_server.uri = kTurnIceServerWithTransport;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
- rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(factory_->CreatePeerConnection(
config, nullptr, std::move(port_allocator_),
@@ -267,7 +267,7 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingSecureTurnUrl) {
ice_server.uri = kSecureTurnIceServerWithoutTransportAndPortParam;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
- rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(factory_->CreatePeerConnection(
config, nullptr, std::move(port_allocator_),
@@ -302,7 +302,7 @@ TEST_F(PeerConnectionFactoryTest, CreatePCUsingIPLiteralAddress) {
ice_server.uri = kTurnIceServerWithIPv6Address;
ice_server.password = kTurnPassword;
config.servers.push_back(ice_server);
- rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
+ std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store(
new FakeDtlsIdentityStore());
rtc::scoped_refptr<PeerConnectionInterface> pc(factory_->CreatePeerConnection(
config, nullptr, std::move(port_allocator_),
« no previous file with comments | « webrtc/api/peerconnectionfactory.cc ('k') | webrtc/api/peerconnectionfactoryproxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698