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

Side by Side Diff: webrtc/p2p/base/transport.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, 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/transport.h ('k') | webrtc/p2p/base/transportchannel.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 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 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> // for std::pair 12 #include <utility> // for std::pair
12 13
13 #include "webrtc/p2p/base/transport.h" 14 #include "webrtc/p2p/base/transport.h"
14 15
15 #include "webrtc/p2p/base/candidate.h" 16 #include "webrtc/p2p/base/candidate.h"
16 #include "webrtc/p2p/base/p2pconstants.h" 17 #include "webrtc/p2p/base/p2pconstants.h"
17 #include "webrtc/p2p/base/port.h" 18 #include "webrtc/p2p/base/port.h"
18 #include "webrtc/p2p/base/transportchannelimpl.h" 19 #include "webrtc/p2p/base/transportchannelimpl.h"
19 #include "webrtc/base/bind.h" 20 #include "webrtc/base/bind.h"
20 #include "webrtc/base/checks.h" 21 #include "webrtc/base/checks.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 RTC_DCHECK(channels_destroyed_); 71 RTC_DCHECK(channels_destroyed_);
71 } 72 }
72 73
73 void Transport::SetIceRole(IceRole role) { 74 void Transport::SetIceRole(IceRole role) {
74 ice_role_ = role; 75 ice_role_ = role;
75 for (const auto& kv : channels_) { 76 for (const auto& kv : channels_) {
76 kv.second->SetIceRole(ice_role_); 77 kv.second->SetIceRole(ice_role_);
77 } 78 }
78 } 79 }
79 80
80 rtc::scoped_ptr<rtc::SSLCertificate> Transport::GetRemoteSSLCertificate() { 81 std::unique_ptr<rtc::SSLCertificate> Transport::GetRemoteSSLCertificate() {
81 if (channels_.empty()) { 82 if (channels_.empty()) {
82 return nullptr; 83 return nullptr;
83 } 84 }
84 85
85 auto iter = channels_.begin(); 86 auto iter = channels_.begin();
86 return iter->second->GetRemoteSSLCertificate(); 87 return iter->second->GetRemoteSSLCertificate();
87 } 88 }
88 89
89 void Transport::SetIceConfig(const IceConfig& config) { 90 void Transport::SetIceConfig(const IceConfig& config) {
90 ice_config_ = config; 91 ice_config_ = config;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 // negotiation happens. 395 // negotiation happens.
395 for (const auto& kv : channels_) { 396 for (const auto& kv : channels_) {
396 if (!ApplyNegotiatedTransportDescription(kv.second, error_desc)) { 397 if (!ApplyNegotiatedTransportDescription(kv.second, error_desc)) {
397 return false; 398 return false;
398 } 399 }
399 } 400 }
400 return true; 401 return true;
401 } 402 }
402 403
403 } // namespace cricket 404 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/transport.h ('k') | webrtc/p2p/base/transportchannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698