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

Side by Side Diff: webrtc/p2p/base/transport.cc

Issue 1304043008: Replacing SSLIdentity* with scoped_refptr<RTCCertificate> in TransportChannel layer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Making overriding "virtual" methods use the override keyword Created 5 years, 3 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
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 bool Transport::GetCertificate( 135 bool Transport::GetCertificate(
136 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) { 136 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) {
137 // 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
138 // acquired on the worker thread. 138 // acquired on the worker thread.
139 return worker_thread_->Invoke<bool>( 139 return worker_thread_->Invoke<bool>(
140 Bind(&Transport::GetCertificate_w, this, certificate)); 140 Bind(&Transport::GetCertificate_w, this, certificate));
141 } 141 }
142 142
143 bool Transport::GetRemoteCertificate(rtc::SSLCertificate** cert) { 143 bool Transport::GetRemoteSSLCertificate(rtc::SSLCertificate** cert) {
144 // 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
145 // certificate is acquired on the worker thread. 145 // certificate is acquired on the worker thread.
146 return worker_thread_->Invoke<bool>( 146 return worker_thread_->Invoke<bool>(
147 Bind(&Transport::GetRemoteCertificate_w, this, cert)); 147 Bind(&Transport::GetRemoteSSLCertificate_w, this, cert));
148 } 148 }
149 149
150 bool Transport::GetRemoteCertificate_w(rtc::SSLCertificate** cert) { 150 bool Transport::GetRemoteSSLCertificate_w(rtc::SSLCertificate** cert) {
151 ASSERT(worker_thread()->IsCurrent()); 151 ASSERT(worker_thread()->IsCurrent());
152 if (channels_.empty()) 152 if (channels_.empty())
153 return false; 153 return false;
154 154
155 ChannelMap::iterator iter = channels_.begin(); 155 ChannelMap::iterator iter = channels_.begin();
156 return iter->second->GetRemoteCertificate(cert); 156 return iter->second->GetRemoteSSLCertificate(cert);
157 } 157 }
158 158
159 void Transport::SetChannelReceivingTimeout(int timeout_ms) { 159 void Transport::SetChannelReceivingTimeout(int timeout_ms) {
160 worker_thread_->Invoke<void>( 160 worker_thread_->Invoke<void>(
161 Bind(&Transport::SetChannelReceivingTimeout_w, this, timeout_ms)); 161 Bind(&Transport::SetChannelReceivingTimeout_w, this, timeout_ms));
162 } 162 }
163 163
164 void Transport::SetChannelReceivingTimeout_w(int timeout_ms) { 164 void Transport::SetChannelReceivingTimeout_w(int timeout_ms) {
165 ASSERT(worker_thread()->IsCurrent()); 165 ASSERT(worker_thread()->IsCurrent());
166 channel_receiving_timeout_ = timeout_ms; 166 channel_receiving_timeout_ = timeout_ms;
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 case MSG_COMPLETED: 900 case MSG_COMPLETED:
901 SignalCompleted(this); 901 SignalCompleted(this);
902 break; 902 break;
903 case MSG_FAILED: 903 case MSG_FAILED:
904 SignalFailed(this); 904 SignalFailed(this);
905 break; 905 break;
906 } 906 }
907 } 907 }
908 908
909 } // namespace cricket 909 } // 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