#include "components/page_content_annotations/core/page_content_annotations_features.h"
#include "base/containers/contains.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "components/page_content_annotations/core/page_content_annotations_switches.h"
#include "ui/base/l10n/l10n_util.h"
namespace page_content_annotations::features {
namespace {
constexpr auto enabled_by_default_desktop_only = …base::FEATURE_DISABLED_BY_DEFAULT;
#else
base::FEATURE_ENABLED_BY_DEFAULT;
#endif
constexpr auto enabled_by_default_non_ios = …base::FEATURE_DISABLED_BY_DEFAULT;
#else
base::FEATURE_ENABLED_BY_DEFAULT;
#endif
bool IsSupportedLocaleForFeature(
const std::string locale,
const base::Feature& feature,
const std::string& default_value = "de,en,es,fr,it,nl,pt,tr") { … }
bool IsSupportedCountryForFeature(const std::string& country_code,
const base::Feature& feature,
const std::string& default_value) { … }
}
BASE_FEATURE(…);
BASE_FEATURE(…);
BASE_FEATURE(…);
BASE_FEATURE(…);
BASE_FEATURE(…);
BASE_FEATURE(…);
BASE_FEATURE(…);
BASE_FEATURE(…);
BASE_FEATURE(…);
BASE_FEATURE(…);
base::TimeDelta PCAServiceWaitForTitleDelayDuration() { … }
bool ShouldEnablePageContentAnnotations() { … }
bool ShouldQueryEmbeddings() { … }
bool ShouldWriteContentAnnotationsToHistoryService() { … }
size_t MaxContentAnnotationRequestsCached() { … }
const base::FeatureParam<bool> kContentAnnotationsExtractRelatedSearchesParam{ … };
bool ShouldExtractRelatedSearches() { … }
bool ShouldExecutePageVisibilityModelOnPageContent(const std::string& locale) { … }
bool RemotePageMetadataEnabled(const std::string& locale,
const std::string& country_code) { … }
int GetMinimumPageCategoryScoreToPersist() { … }
int NumBitsForRAPPORMetrics() { … }
double NoiseProbabilityForRAPPORMetrics() { … }
bool PageVisibilityBatchAnnotationsEnabled() { … }
bool TextEmbeddingBatchAnnotationsEnabled() { … }
size_t AnnotateVisitBatchSize() { … }
base::TimeDelta PageContentAnnotationValidationStartupDelay() { … }
size_t PageContentAnnotationsValidationBatchSize() { … }
base::TimeDelta PageContentAnnotationBatchSizeTimeoutDuration() { … }
size_t MaxVisitAnnotationCacheSize() { … }
bool ShouldPersistSalientImageMetadata(const std::string& locale,
const std::string& country_code) { … }
size_t MaxRelatedSearchesCacheSize() { … }
}