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

Side by Side Diff: webrtc/p2p/base/faketransportcontroller.h

Issue 1802013002: A bunch of interfaces: Return scoped_ptr<SSLCertificate> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase 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 2009 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2009 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 252 }
253 return false; 253 return false;
254 } 254 }
255 255
256 bool GetSslCipherSuite(int* cipher_suite) override { return false; } 256 bool GetSslCipherSuite(int* cipher_suite) override { return false; }
257 257
258 rtc::scoped_refptr<rtc::RTCCertificate> GetLocalCertificate() const { 258 rtc::scoped_refptr<rtc::RTCCertificate> GetLocalCertificate() const {
259 return local_cert_; 259 return local_cert_;
260 } 260 }
261 261
262 bool GetRemoteSSLCertificate(rtc::SSLCertificate** cert) const override { 262 rtc::scoped_ptr<rtc::SSLCertificate> GetRemoteSSLCertificate()
263 if (!remote_cert_) 263 const override {
264 return false; 264 return remote_cert_ ? rtc::scoped_ptr<rtc::SSLCertificate>(
265 265 remote_cert_->GetReference())
266 *cert = remote_cert_->GetReference(); 266 : nullptr;
267 return true;
268 } 267 }
269 268
270 bool ExportKeyingMaterial(const std::string& label, 269 bool ExportKeyingMaterial(const std::string& label,
271 const uint8_t* context, 270 const uint8_t* context,
272 size_t context_len, 271 size_t context_len,
273 bool use_context, 272 bool use_context,
274 uint8_t* result, 273 uint8_t* result,
275 size_t result_len) override { 274 size_t result_len) override {
276 if (chosen_crypto_suite_ != rtc::SRTP_INVALID_CRYPTO_SUITE) { 275 if (chosen_crypto_suite_ != rtc::SRTP_INVALID_CRYPTO_SUITE) {
277 memset(result, 0xff, result_len); 276 memset(result, 0xff, result_len);
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 } 529 }
531 } 530 }
532 531
533 private: 532 private:
534 bool fail_create_channel_; 533 bool fail_create_channel_;
535 }; 534 };
536 535
537 } // namespace cricket 536 } // namespace cricket
538 537
539 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ 538 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698