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

Side by Side Diff: webrtc/p2p/base/dtlstransportchannel.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 unified diff | Download patch
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
11 #include <memory>
11 #include <utility> 12 #include <utility>
12 13
13 #include "webrtc/p2p/base/dtlstransportchannel.h" 14 #include "webrtc/p2p/base/dtlstransportchannel.h"
14 15
15 #include "webrtc/p2p/base/common.h" 16 #include "webrtc/p2p/base/common.h"
16 #include "webrtc/base/buffer.h" 17 #include "webrtc/base/buffer.h"
17 #include "webrtc/base/checks.h" 18 #include "webrtc/base/checks.h"
18 #include "webrtc/base/dscp.h" 19 #include "webrtc/base/dscp.h"
19 #include "webrtc/base/messagequeue.h" 20 #include "webrtc/base/messagequeue.h"
20 #include "webrtc/base/sslstreamadapter.h" 21 #include "webrtc/base/sslstreamadapter.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 return false; 244 return false;
244 } 245 }
245 246
246 if (reconnect) { 247 if (reconnect) {
247 Reconnect(); 248 Reconnect();
248 } 249 }
249 250
250 return true; 251 return true;
251 } 252 }
252 253
253 rtc::scoped_ptr<rtc::SSLCertificate> 254 std::unique_ptr<rtc::SSLCertificate>
254 DtlsTransportChannelWrapper::GetRemoteSSLCertificate() const { 255 DtlsTransportChannelWrapper::GetRemoteSSLCertificate() const {
255 if (!dtls_) { 256 if (!dtls_) {
256 return nullptr; 257 return nullptr;
257 } 258 }
258 259
259 return dtls_->GetPeerCertificate(); 260 return dtls_->GetPeerCertificate();
260 } 261 }
261 262
262 bool DtlsTransportChannelWrapper::SetupDtls() { 263 bool DtlsTransportChannelWrapper::SetupDtls() {
263 StreamInterfaceChannel* downward = new StreamInterfaceChannel(channel_); 264 StreamInterfaceChannel* downward = new StreamInterfaceChannel(channel_);
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 654
654 void DtlsTransportChannelWrapper::Reconnect() { 655 void DtlsTransportChannelWrapper::Reconnect() {
655 set_dtls_state(DTLS_TRANSPORT_NEW); 656 set_dtls_state(DTLS_TRANSPORT_NEW);
656 set_writable(false); 657 set_writable(false);
657 if (channel_->writable()) { 658 if (channel_->writable()) {
658 OnWritableState(channel_); 659 OnWritableState(channel_);
659 } 660 }
660 } 661 }
661 662
662 } // namespace cricket 663 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.h ('k') | webrtc/p2p/base/dtlstransportchannel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698