#include "services/network/resource_scheduler/resource_scheduler_params_manager.h"
#include <optional>
#include "base/feature_list.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "net/nqe/network_quality_estimator.h"
#include "net/nqe/network_quality_estimator_params.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/cpp/features.h"
namespace network {
namespace {
std::optional<base::TimeDelta> GetMaxWaitTimeP2PConnections() { … }
std::set<int32_t> GetThrottledHashes() { … }
constexpr size_t kDefaultMaxNumDelayableRequestsPerClient = …;
constexpr int kHttpRttMultiplierForQueuingDuration = …;
ResourceSchedulerParamsManager::ParamsForNetworkQualityContainer
GetParamsForNetworkQualityContainer() { … }
}
ResourceSchedulerParamsManager::ParamsForNetworkQuality::
ParamsForNetworkQuality()
: … { … }
ResourceSchedulerParamsManager::ParamsForNetworkQuality::
ParamsForNetworkQuality(size_t max_delayable_requests,
double non_delayable_weight,
bool delay_requests_on_multiplexed_connections,
std::optional<base::TimeDelta> max_queuing_time)
: … { … }
ResourceSchedulerParamsManager::ParamsForNetworkQuality::
ParamsForNetworkQuality(
const ResourceSchedulerParamsManager::ParamsForNetworkQuality& other) =
default;
ResourceSchedulerParamsManager::ParamsForNetworkQuality&
ResourceSchedulerParamsManager::ParamsForNetworkQuality::operator=(
const ParamsForNetworkQuality& other) = default;
ResourceSchedulerParamsManager::ResourceSchedulerParamsManager()
: … { … }
ResourceSchedulerParamsManager::ResourceSchedulerParamsManager(
const ParamsForNetworkQualityContainer&
params_for_network_quality_container)
: … { … }
ResourceSchedulerParamsManager::ResourceSchedulerParamsManager(
const ResourceSchedulerParamsManager& other)
: … { … }
ResourceSchedulerParamsManager::~ResourceSchedulerParamsManager() { … }
ResourceSchedulerParamsManager::ParamsForNetworkQuality
ResourceSchedulerParamsManager::GetParamsForEffectiveConnectionType(
net::EffectiveConnectionType effective_connection_type) const { … }
bool ResourceSchedulerParamsManager::CanThrottleNetworkTrafficAnnotationHash(
const int32_t unique_id_hash_code) const { … }
base::TimeDelta ResourceSchedulerParamsManager::
TimeToPauseHeavyBrowserInitiatedRequestsAfterEndOfP2PConnections() { … }
}