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

Side by Side Diff: webrtc/p2p/quic/quictransport.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 P2PTransportChannel* ice_channel = 81 P2PTransportChannel* ice_channel =
82 new P2PTransportChannel(name(), component, port_allocator()); 82 new P2PTransportChannel(name(), component, port_allocator());
83 return new QuicTransportChannel(ice_channel); 83 return new QuicTransportChannel(ice_channel);
84 } 84 }
85 85
86 void QuicTransport::DestroyTransportChannel(TransportChannelImpl* channel) { 86 void QuicTransport::DestroyTransportChannel(TransportChannelImpl* channel) {
87 delete channel; 87 delete channel;
88 } 88 }
89 89
90 bool QuicTransport::GetSslRole(rtc::SSLRole* ssl_role) const { 90 bool QuicTransport::GetSslRole(rtc::SSLRole* ssl_role) const {
91 RTC_DCHECK(ssl_role != NULL); 91 RTC_DCHECK(ssl_role != nullptr);
92 *ssl_role = local_role_; 92 *ssl_role = local_role_;
93 return true; 93 return true;
94 } 94 }
95 95
96 bool QuicTransport::ApplyNegotiatedTransportDescription( 96 bool QuicTransport::ApplyNegotiatedTransportDescription(
97 TransportChannelImpl* channel, 97 TransportChannelImpl* channel,
98 std::string* error_desc) { 98 std::string* error_desc) {
99 // Set ssl role and remote fingerprint. These are required for QUIC setup. 99 // Set ssl role and remote fingerprint. These are required for QUIC setup.
100 if (!channel->SetSslRole(local_role_)) { 100 if (!channel->SetSslRole(local_role_)) {
101 return BadTransportDescription("Failed to set ssl role for the channel.", 101 return BadTransportDescription("Failed to set ssl role for the channel.",
102 error_desc); 102 error_desc);
103 } 103 }
104 // Apply remote fingerprint. 104 // Apply remote fingerprint.
105 if (!channel->SetRemoteFingerprint( 105 if (!channel->SetRemoteFingerprint(
106 remote_fingerprint_->algorithm, 106 remote_fingerprint_->algorithm,
107 reinterpret_cast<const uint8_t*>(remote_fingerprint_->digest.data()), 107 reinterpret_cast<const uint8_t*>(remote_fingerprint_->digest.data()),
108 remote_fingerprint_->digest.size())) { 108 remote_fingerprint_->digest.size())) {
109 return BadTransportDescription("Failed to apply remote fingerprint.", 109 return BadTransportDescription("Failed to apply remote fingerprint.",
110 error_desc); 110 error_desc);
111 } 111 }
112 return Transport::ApplyNegotiatedTransportDescription(channel, error_desc); 112 return Transport::ApplyNegotiatedTransportDescription(channel, error_desc);
113 } 113 }
114 114
115 } // namespace cricket 115 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698