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 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 119 |
120 Transport::~Transport() { | 120 Transport::~Transport() { |
121 ASSERT(signaling_thread_->IsCurrent()); | 121 ASSERT(signaling_thread_->IsCurrent()); |
122 ASSERT(destroyed_); | 122 ASSERT(destroyed_); |
123 } | 123 } |
124 | 124 |
125 void Transport::SetIceRole(IceRole role) { | 125 void Transport::SetIceRole(IceRole role) { |
126 worker_thread_->Invoke<void>(Bind(&Transport::SetIceRole_w, this, role)); | 126 worker_thread_->Invoke<void>(Bind(&Transport::SetIceRole_w, this, role)); |
127 } | 127 } |
128 | 128 |
129 void Transport::SetIdentity(rtc::SSLIdentity* identity) { | 129 void Transport::SetCertificate( |
130 worker_thread_->Invoke<void>(Bind(&Transport::SetIdentity_w, this, identity)); | 130 const rtc::scoped_refptr<rtc::RTCCertificate>& certificate) { |
| 131 worker_thread_->Invoke<void>(Bind(&Transport::SetCertificate_w, this, |
| 132 certificate)); |
131 } | 133 } |
132 | 134 |
133 bool Transport::GetIdentity(rtc::SSLIdentity** identity) { | 135 bool Transport::GetCertificate( |
| 136 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) { |
134 // The identity is set on the worker thread, so for safety it must also be | 137 // The identity is set on the worker thread, so for safety it must also be |
135 // acquired on the worker thread. | 138 // acquired on the worker thread. |
136 return worker_thread_->Invoke<bool>( | 139 return worker_thread_->Invoke<bool>( |
137 Bind(&Transport::GetIdentity_w, this, identity)); | 140 Bind(&Transport::GetCertificate_w, this, certificate)); |
138 } | 141 } |
139 | 142 |
140 bool Transport::GetRemoteCertificate(rtc::SSLCertificate** cert) { | 143 bool Transport::GetRemoteCertificate(rtc::SSLCertificate** cert) { |
141 // Channels can be deleted on the worker thread, so for safety the remote | 144 // Channels can be deleted on the worker thread, so for safety the remote |
142 // certificate is acquired on the worker thread. | 145 // certificate is acquired on the worker thread. |
143 return worker_thread_->Invoke<bool>( | 146 return worker_thread_->Invoke<bool>( |
144 Bind(&Transport::GetRemoteCertificate_w, this, cert)); | 147 Bind(&Transport::GetRemoteCertificate_w, this, cert)); |
145 } | 148 } |
146 | 149 |
147 bool Transport::GetRemoteCertificate_w(rtc::SSLCertificate** cert) { | 150 bool Transport::GetRemoteCertificate_w(rtc::SSLCertificate** cert) { |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 case MSG_COMPLETED: | 900 case MSG_COMPLETED: |
898 SignalCompleted(this); | 901 SignalCompleted(this); |
899 break; | 902 break; |
900 case MSG_FAILED: | 903 case MSG_FAILED: |
901 SignalFailed(this); | 904 SignalFailed(this); |
902 break; | 905 break; |
903 } | 906 } |
904 } | 907 } |
905 | 908 |
906 } // namespace cricket | 909 } // namespace cricket |
OLD | NEW |