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

Unified Diff: webrtc/p2p/quic/quictransport_unittest.cc

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
« no previous file with comments | « webrtc/p2p/quic/quictransport.h ('k') | webrtc/pc/yuvscaler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/quic/quictransport_unittest.cc
diff --git a/webrtc/p2p/quic/quictransport_unittest.cc b/webrtc/p2p/quic/quictransport_unittest.cc
index bc99f6bd313e36b6d6aa20a676e448b708117df5..1fd48f7ec411627d9b8429d07bc2d5aaeab423c7 100644
--- a/webrtc/p2p/quic/quictransport_unittest.cc
+++ b/webrtc/p2p/quic/quictransport_unittest.cc
@@ -10,6 +10,7 @@
#include "webrtc/p2p/quic/quictransport.h"
+#include <memory>
#include <string>
#include <vector>
@@ -30,15 +31,15 @@ static const char kIcePwd2[] = "TESTICEPWD00000000000002";
static rtc::scoped_refptr<rtc::RTCCertificate> CreateCertificate(
std::string name) {
- return rtc::RTCCertificate::Create(rtc::scoped_ptr<rtc::SSLIdentity>(
+ return rtc::RTCCertificate::Create(std::unique_ptr<rtc::SSLIdentity>(
rtc::SSLIdentity::Generate(name, rtc::KT_DEFAULT)));
}
-static rtc::scoped_ptr<rtc::SSLFingerprint> CreateFingerprint(
+static std::unique_ptr<rtc::SSLFingerprint> CreateFingerprint(
rtc::RTCCertificate* cert) {
std::string digest_algorithm;
cert->ssl_certificate().GetSignatureDigestAlgorithm(&digest_algorithm);
- return rtc::scoped_ptr<rtc::SSLFingerprint>(
+ return std::unique_ptr<rtc::SSLFingerprint>(
rtc::SSLFingerprint::Create(digest_algorithm, cert->identity()));
}
@@ -59,7 +60,7 @@ class QuicTransportTest : public testing::Test {
ASSERT_NE(nullptr, local_certificate);
transport_.SetLocalCertificate(local_certificate);
- rtc::scoped_ptr<rtc::SSLFingerprint> local_fingerprint =
+ std::unique_ptr<rtc::SSLFingerprint> local_fingerprint =
CreateFingerprint(local_certificate.get());
ASSERT_NE(nullptr, local_fingerprint);
TransportDescription local_desc(std::vector<std::string>(), kIceUfrag1,
@@ -73,11 +74,11 @@ class QuicTransportTest : public testing::Test {
channel->GetLocalCertificate();
ASSERT_NE(nullptr, channel_local_certificate);
EXPECT_EQ(local_certificate, channel_local_certificate);
- rtc::scoped_ptr<rtc::SSLFingerprint> remote_fingerprint =
+ std::unique_ptr<rtc::SSLFingerprint> remote_fingerprint =
CreateFingerprint(CreateCertificate("remote").get());
// NegotiateTransportDescription was not called yet. The SSL role should
// not be set and neither should the remote fingerprint.
- rtc::scoped_ptr<rtc::SSLRole> role(new rtc::SSLRole());
+ std::unique_ptr<rtc::SSLRole> role(new rtc::SSLRole());
EXPECT_FALSE(channel->GetSslRole(role.get()));
// Setting the remote description should set the SSL role.
ASSERT_NE(nullptr, remote_fingerprint);
« no previous file with comments | « webrtc/p2p/quic/quictransport.h ('k') | webrtc/pc/yuvscaler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698