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

Unified Diff: webrtc/base/sslstreamadapter_unittest.cc

Issue 1920043002: Replace scoped_ptr with unique_ptr in webrtc/base/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased 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/base/sslstreamadapter.h ('k') | webrtc/base/stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/sslstreamadapter_unittest.cc
diff --git a/webrtc/base/sslstreamadapter_unittest.cc b/webrtc/base/sslstreamadapter_unittest.cc
index 8d5b275db8c19d6ecb9ea784f07edb8da4c98049..ac9fef9f248ad15ca09c83a68af58270a602daf2 100644
--- a/webrtc/base/sslstreamadapter_unittest.cc
+++ b/webrtc/base/sslstreamadapter_unittest.cc
@@ -10,13 +10,13 @@
#include <algorithm>
+#include <memory>
#include <set>
#include <string>
#include "webrtc/base/bufferqueue.h"
#include "webrtc/base/gunit.h"
#include "webrtc/base/helpers.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/ssladapter.h"
#include "webrtc/base/sslconfig.h"
#include "webrtc/base/sslidentity.h"
@@ -474,7 +474,7 @@ class SSLStreamAdapterTestBase : public testing::Test,
return server_ssl_->GetDtlsSrtpCryptoSuite(retval);
}
- rtc::scoped_ptr<rtc::SSLCertificate> GetPeerCertificate(bool client) {
+ std::unique_ptr<rtc::SSLCertificate> GetPeerCertificate(bool client) {
if (client)
return client_ssl_->GetPeerCertificate();
else
@@ -526,8 +526,8 @@ class SSLStreamAdapterTestBase : public testing::Test,
rtc::KeyParams server_key_type_;
SSLDummyStreamBase *client_stream_; // freed by client_ssl_ destructor
SSLDummyStreamBase *server_stream_; // freed by server_ssl_ destructor
- rtc::scoped_ptr<rtc::SSLStreamAdapter> client_ssl_;
- rtc::scoped_ptr<rtc::SSLStreamAdapter> server_ssl_;
+ std::unique_ptr<rtc::SSLStreamAdapter> client_ssl_;
+ std::unique_ptr<rtc::SSLStreamAdapter> server_ssl_;
rtc::SSLIdentity *client_identity_; // freed by client_ssl_ destructor
rtc::SSLIdentity *server_identity_; // freed by server_ssl_ destructor
int delay_;
@@ -1043,7 +1043,7 @@ TEST_F(SSLStreamAdapterTestDTLSFromPEMStrings, TestDTLSGetPeerCertificate) {
TestHandshake();
// The client should have a peer certificate after the handshake.
- rtc::scoped_ptr<rtc::SSLCertificate> client_peer_cert =
+ std::unique_ptr<rtc::SSLCertificate> client_peer_cert =
GetPeerCertificate(true);
ASSERT_TRUE(client_peer_cert);
@@ -1055,7 +1055,7 @@ TEST_F(SSLStreamAdapterTestDTLSFromPEMStrings, TestDTLSGetPeerCertificate) {
ASSERT_FALSE(client_peer_cert->GetChain());
// The server should have a peer certificate after the handshake.
- rtc::scoped_ptr<rtc::SSLCertificate> server_peer_cert =
+ std::unique_ptr<rtc::SSLCertificate> server_peer_cert =
GetPeerCertificate(false);
ASSERT_TRUE(server_peer_cert);
« no previous file with comments | « webrtc/base/sslstreamadapter.h ('k') | webrtc/base/stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698