OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |