Use final so that the compiler will be able to inline calls

Bug: webrtc:9987
Change-Id: Ib5d344ea2b28e928140bbea297f72fb5672855e6
Reviewed-on: https://webrtc-review.googlesource.com/c/123223
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26806}
This commit is contained in:
Karl Wiberg 2019-02-22 00:57:06 +01:00 committed by Commit Bot
parent 5966c50963
commit 4ae6347ace
3 changed files with 12 additions and 22 deletions

View File

@ -210,13 +210,11 @@ class PeerConnection : public PeerConnectionInternal,
void Close() override;
// PeerConnectionInternal implementation.
rtc::Thread* network_thread() const override {
rtc::Thread* network_thread() const final {
return factory_->network_thread();
}
rtc::Thread* worker_thread() const override {
return factory_->worker_thread();
}
rtc::Thread* signaling_thread() const override {
rtc::Thread* worker_thread() const final { return factory_->worker_thread(); }
rtc::Thread* signaling_thread() const final {
return factory_->signaling_thread();
}

View File

@ -396,20 +396,6 @@ cricket::ChannelManager* PeerConnectionFactory::channel_manager() {
return channel_manager_.get();
}
rtc::Thread* PeerConnectionFactory::signaling_thread() {
// This method can be called on a different thread when the factory is
// created in CreatePeerConnectionFactory().
return signaling_thread_;
}
rtc::Thread* PeerConnectionFactory::worker_thread() {
return worker_thread_;
}
rtc::Thread* PeerConnectionFactory::network_thread() {
return network_thread_;
}
std::unique_ptr<RtcEventLog> PeerConnectionFactory::CreateRtcEventLog_w() {
RTC_DCHECK_RUN_ON(worker_thread_);

View File

@ -76,9 +76,15 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface {
CreateSctpTransportInternalFactory();
virtual cricket::ChannelManager* channel_manager();
virtual rtc::Thread* signaling_thread();
virtual rtc::Thread* worker_thread();
virtual rtc::Thread* network_thread();
rtc::Thread* signaling_thread() {
// This method can be called on a different thread when the factory is
// created in CreatePeerConnectionFactory().
return signaling_thread_;
}
rtc::Thread* worker_thread() { return worker_thread_; }
rtc::Thread* network_thread() { return network_thread_; }
const Options& options() const { return options_; }
MediaTransportFactory* media_transport_factory() {