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

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

Issue 1802013002: A bunch of interfaces: Return scoped_ptr<SSLCertificate> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: less auto 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
« no previous file with comments | « webrtc/p2p/base/transportcontroller.h ('k') | webrtc/p2p/base/transportcontroller_unittest.cc » ('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 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 bool TransportController::GetLocalCertificate( 81 bool TransportController::GetLocalCertificate(
82 const std::string& transport_name, 82 const std::string& transport_name,
83 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) { 83 rtc::scoped_refptr<rtc::RTCCertificate>* certificate) {
84 return worker_thread_->Invoke<bool>( 84 return worker_thread_->Invoke<bool>(
85 rtc::Bind(&TransportController::GetLocalCertificate_w, this, 85 rtc::Bind(&TransportController::GetLocalCertificate_w, this,
86 transport_name, certificate)); 86 transport_name, certificate));
87 } 87 }
88 88
89 bool TransportController::GetRemoteSSLCertificate( 89 rtc::scoped_ptr<rtc::SSLCertificate>
90 const std::string& transport_name, 90 TransportController::GetRemoteSSLCertificate(
91 rtc::SSLCertificate** cert) { 91 const std::string& transport_name) {
92 return worker_thread_->Invoke<bool>( 92 return worker_thread_->Invoke<rtc::scoped_ptr<rtc::SSLCertificate>>(rtc::Bind(
93 rtc::Bind(&TransportController::GetRemoteSSLCertificate_w, this, 93 &TransportController::GetRemoteSSLCertificate_w, this, transport_name));
94 transport_name, cert));
95 } 94 }
96 95
97 bool TransportController::SetLocalTransportDescription( 96 bool TransportController::SetLocalTransportDescription(
98 const std::string& transport_name, 97 const std::string& transport_name,
99 const TransportDescription& tdesc, 98 const TransportDescription& tdesc,
100 ContentAction action, 99 ContentAction action,
101 std::string* err) { 100 std::string* err) {
102 return worker_thread_->Invoke<bool>( 101 return worker_thread_->Invoke<bool>(
103 rtc::Bind(&TransportController::SetLocalTransportDescription_w, this, 102 rtc::Bind(&TransportController::SetLocalTransportDescription_w, this,
104 transport_name, tdesc, action, err)); 103 transport_name, tdesc, action, err));
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 RTC_DCHECK(worker_thread_->IsCurrent()); 387 RTC_DCHECK(worker_thread_->IsCurrent());
389 388
390 Transport* t = GetTransport_w(transport_name); 389 Transport* t = GetTransport_w(transport_name);
391 if (!t) { 390 if (!t) {
392 return false; 391 return false;
393 } 392 }
394 393
395 return t->GetLocalCertificate(certificate); 394 return t->GetLocalCertificate(certificate);
396 } 395 }
397 396
398 bool TransportController::GetRemoteSSLCertificate_w( 397 rtc::scoped_ptr<rtc::SSLCertificate>
399 const std::string& transport_name, 398 TransportController::GetRemoteSSLCertificate_w(
400 rtc::SSLCertificate** cert) { 399 const std::string& transport_name) {
401 RTC_DCHECK(worker_thread_->IsCurrent()); 400 RTC_DCHECK(worker_thread_->IsCurrent());
402 401
403 Transport* t = GetTransport_w(transport_name); 402 Transport* t = GetTransport_w(transport_name);
404 if (!t) { 403 if (!t) {
405 return false; 404 return nullptr;
406 } 405 }
407 406
408 return t->GetRemoteSSLCertificate(cert); 407 return t->GetRemoteSSLCertificate();
409 } 408 }
410 409
411 bool TransportController::SetLocalTransportDescription_w( 410 bool TransportController::SetLocalTransportDescription_w(
412 const std::string& transport_name, 411 const std::string& transport_name,
413 const TransportDescription& tdesc, 412 const TransportDescription& tdesc,
414 ContentAction action, 413 ContentAction action,
415 std::string* err) { 414 std::string* err) {
416 RTC_DCHECK(worker_thread()->IsCurrent()); 415 RTC_DCHECK(worker_thread()->IsCurrent());
417 416
418 Transport* transport = GetTransport_w(transport_name); 417 Transport* transport = GetTransport_w(transport_name);
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 } 644 }
646 if (gathering_state_ != new_gathering_state) { 645 if (gathering_state_ != new_gathering_state) {
647 gathering_state_ = new_gathering_state; 646 gathering_state_ = new_gathering_state;
648 signaling_thread_->Post( 647 signaling_thread_->Post(
649 this, MSG_ICEGATHERINGSTATE, 648 this, MSG_ICEGATHERINGSTATE,
650 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state)); 649 new rtc::TypedMessageData<IceGatheringState>(new_gathering_state));
651 } 650 }
652 } 651 }
653 652
654 } // namespace cricket 653 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/transportcontroller.h ('k') | webrtc/p2p/base/transportcontroller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698