// Copyright 2019 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/predictors/predictors_features.h" #include "base/metrics/field_trial_params.h" #include "build/build_config.h" namespace features { namespace { constexpr base::FeatureState kFeatureEnabledOnlyOnAndroid = …; } // namespace // Whether local predictions should be used to make preconnect predictions. BASE_FEATURE(…); // Modifies loading predictor so that it only learns about subresources and // origins that are high priority. BASE_FEATURE(…); // Configures the loading predictor table size and other base parameters. BASE_FEATURE(…); // Modifies loading predictor so that the predictions also contain origins of // the redirect target of the navigation. BASE_FEATURE(…); // Modifies loading predictor so that the value of the |always_access_network| // attribute is not used when computing the predicting score for an origin. BASE_FEATURE(…); constexpr base::FeatureState kLoadingPredictorUseOptimizationGuideDefaultFeatureState = …; // Modifies loading predictor so that it can also use predictions coming from // the optimization guide. BASE_FEATURE(…); constexpr base::FeatureState kLoadingPredictorPrefetchDefaultFeatureState = …; // Modifies loading predictor so that it does prefetches of subresources instead // of preconnects. BASE_FEATURE(…); // Use the kURLLoadOptionReadAndDiscardBody option to URLLoader to avoid // unnecessarily copying response body data. BASE_FEATURE(…); const base::FeatureParam<PrefetchSubresourceType>::Option kPrefetchSubresourceTypeParamOptions[] = …; const base::FeatureParam<PrefetchSubresourceType> kLoadingPredictorPrefetchSubresourceType{ … }; BASE_FEATURE(…); bool ShouldUseLocalPredictions() { … } bool ShouldUseOptimizationGuidePredictions() { … } bool ShouldAlwaysRetrieveOptimizationGuidePredictions() { … } size_t GetMaxInflightPrefetches() { … } // If this is enabled, LoadingPredictor avoids prefetching during // browser startup. BASE_FEATURE(…); // If this is enabled, LoadingPredictor restricts the number of preconnects for // the same destination to one. BASE_FEATURE(…); } // namespace features