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

Side by Side Diff: webrtc/p2p/base/dtlstransportchannel_unittest.cc

Issue 1942823002: Remove webrtc/base/scoped_ptr.h (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix additional scoped_ptr uses that had been added Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « webrtc/p2p/base/asyncstuntcpsocket.h ('k') | webrtc/p2p/base/stunserver.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 24 matching lines...) Expand all
35 static const int kFakePacketId = 0x1234; 35 static const int kFakePacketId = 0x1234;
36 static const int kTimeout = 10000; 36 static const int kTimeout = 10000;
37 37
38 static bool IsRtpLeadByte(uint8_t b) { 38 static bool IsRtpLeadByte(uint8_t b) {
39 return ((b & 0xC0) == 0x80); 39 return ((b & 0xC0) == 0x80);
40 } 40 }
41 41
42 cricket::TransportDescription MakeTransportDescription( 42 cricket::TransportDescription MakeTransportDescription(
43 const rtc::scoped_refptr<rtc::RTCCertificate>& cert, 43 const rtc::scoped_refptr<rtc::RTCCertificate>& cert,
44 cricket::ConnectionRole role) { 44 cricket::ConnectionRole role) {
45 rtc::scoped_ptr<rtc::SSLFingerprint> fingerprint; 45 std::unique_ptr<rtc::SSLFingerprint> fingerprint;
46 if (cert) { 46 if (cert) {
47 std::string digest_algorithm; 47 std::string digest_algorithm;
48 cert->ssl_certificate().GetSignatureDigestAlgorithm(&digest_algorithm); 48 cert->ssl_certificate().GetSignatureDigestAlgorithm(&digest_algorithm);
49 fingerprint.reset( 49 fingerprint.reset(
50 rtc::SSLFingerprint::Create(digest_algorithm, cert->identity())); 50 rtc::SSLFingerprint::Create(digest_algorithm, cert->identity()));
51 } 51 }
52 return cricket::TransportDescription(std::vector<std::string>(), kIceUfrag1, 52 return cricket::TransportDescription(std::vector<std::string>(), kIceUfrag1,
53 kIcePwd1, cricket::ICEMODE_FULL, role, 53 kIcePwd1, cricket::ICEMODE_FULL, role,
54 fingerprint.get()); 54 fingerprint.get());
55 } 55 }
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 client1_.transport()->SetRemoteTransportDescription( 967 client1_.transport()->SetRemoteTransportDescription(
968 MakeTransportDescription(client2_.certificate(), 968 MakeTransportDescription(client2_.certificate(),
969 cricket::CONNECTIONROLE_ACTIVE), 969 cricket::CONNECTIONROLE_ACTIVE),
970 cricket::CA_ANSWER, nullptr); 970 cricket::CA_ANSWER, nullptr);
971 EXPECT_TRUE(client1_.Connect(&client2_, true)); 971 EXPECT_TRUE(client1_.Connect(&client2_, true));
972 EXPECT_TRUE_WAIT( 972 EXPECT_TRUE_WAIT(
973 client1_.all_channels_writable() && client2_.all_channels_writable(), 973 client1_.all_channels_writable() && client2_.all_channels_writable(),
974 kTimeout); 974 kTimeout);
975 EXPECT_EQ(1, client1_.received_dtls_client_hellos()); 975 EXPECT_EQ(1, client1_.received_dtls_client_hellos());
976 } 976 }
OLDNEW
« no previous file with comments | « webrtc/p2p/base/asyncstuntcpsocket.h ('k') | webrtc/p2p/base/stunserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698