mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Cleanup ConnectionContext dependency on field trials
ConntectionContext now keeps and expose field trials as part of the Environment, and do not need to be aware about field trials specifically Bug: webrtc:15656 Change-Id: Ib78694a65a9ca7c8bf273eeaf9334323ddb841c7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329420 Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#41328}
This commit is contained in:
parent
d6601ce66b
commit
539bca9ebb
4 changed files with 3 additions and 15 deletions
|
@ -929,7 +929,6 @@ rtc_library("connection_context") {
|
|||
]
|
||||
deps = [
|
||||
":media_factory",
|
||||
"../api:field_trials_view",
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:media_stream_interface",
|
||||
"../api:refcountedbase",
|
||||
|
@ -937,7 +936,6 @@ rtc_library("connection_context") {
|
|||
"../api:sequence_checker",
|
||||
"../api/environment",
|
||||
"../api/neteq:neteq_api",
|
||||
"../api/transport:field_trial_based_config",
|
||||
"../api/transport:sctp_transport_factory_interface",
|
||||
"../media:rtc_data_sctp_transport_factory",
|
||||
"../media:rtc_media_base",
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <vector>
|
||||
|
||||
#include "api/environment/environment.h"
|
||||
#include "api/transport/field_trial_based_config.h"
|
||||
#include "media/base/media_engine.h"
|
||||
#include "media/sctp/sctp_transport_factory.h"
|
||||
#include "pc/media_factory.h"
|
||||
|
@ -63,8 +62,7 @@ rtc::Thread* MaybeWrapThread(rtc::Thread* signaling_thread,
|
|||
|
||||
std::unique_ptr<SctpTransportFactoryInterface> MaybeCreateSctpFactory(
|
||||
std::unique_ptr<SctpTransportFactoryInterface> factory,
|
||||
rtc::Thread* network_thread,
|
||||
const FieldTrialsView& field_trials) {
|
||||
rtc::Thread* network_thread) {
|
||||
if (factory) {
|
||||
return factory;
|
||||
}
|
||||
|
@ -113,8 +111,7 @@ ConnectionContext::ConnectionContext(
|
|||
default_socket_factory_(std::move(dependencies->packet_socket_factory)),
|
||||
sctp_factory_(
|
||||
MaybeCreateSctpFactory(std::move(dependencies->sctp_factory),
|
||||
network_thread(),
|
||||
env_.field_trials())),
|
||||
network_thread())),
|
||||
use_rtx_(true) {
|
||||
RTC_DCHECK_RUN_ON(signaling_thread_);
|
||||
RTC_DCHECK(!(default_network_manager_ && network_monitor_factory_))
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <string>
|
||||
|
||||
#include "api/environment/environment.h"
|
||||
#include "api/field_trials_view.h"
|
||||
#include "api/media_stream_interface.h"
|
||||
#include "api/peer_connection_interface.h"
|
||||
#include "api/ref_counted_base.h"
|
||||
|
@ -80,12 +79,6 @@ class ConnectionContext final
|
|||
// but they are not supposed to change after creating the PeerConnection.
|
||||
const Environment& env() const { return env_; }
|
||||
|
||||
// Field trials associated with the PeerConnectionFactory.
|
||||
// Note: that there can be different field trials for different
|
||||
// PeerConnections (but they are not supposed change after creating the
|
||||
// PeerConnection).
|
||||
const FieldTrialsView& field_trials() const { return env_.field_trials(); }
|
||||
|
||||
// Accessors only used from the PeerConnectionFactory class
|
||||
rtc::NetworkManager* default_network_manager() {
|
||||
RTC_DCHECK_RUN_ON(signaling_thread_);
|
||||
|
|
|
@ -109,7 +109,7 @@ class PeerConnectionFactory : public PeerConnectionFactoryInterface {
|
|||
}
|
||||
|
||||
const FieldTrialsView& field_trials() const {
|
||||
return context_->field_trials();
|
||||
return context_->env().field_trials();
|
||||
}
|
||||
|
||||
cricket::MediaEngineInterface* media_engine() const;
|
||||
|
|
Loading…
Reference in a new issue