#include "components/feature_engagement/internal/feature_config_event_storage_validator.h"
#include <unordered_map>
#include <unordered_set>
#include "base/feature_list.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/feature_engagement/public/configuration.h"
#include "components/feature_engagement/public/feature_list.h"
#include "components/feature_engagement/public/group_constants.h"
namespace feature_engagement {
FeatureConfigEventStorageValidator::FeatureConfigEventStorageValidator() =
default;
FeatureConfigEventStorageValidator::~FeatureConfigEventStorageValidator() =
default;
bool FeatureConfigEventStorageValidator::ShouldStore(
const std::string& event_name) const { … }
bool FeatureConfigEventStorageValidator::ShouldKeep(
const std::string& event_name,
uint32_t event_day,
uint32_t current_day) const { … }
void FeatureConfigEventStorageValidator::InitializeFeatures(
const FeatureVector& features,
const GroupVector& groups,
const Configuration& configuration) { … }
void FeatureConfigEventStorageValidator::ClearForTesting() { … }
void FeatureConfigEventStorageValidator::InitializeFeatureConfig(
const FeatureConfig& feature_config) { … }
void FeatureConfigEventStorageValidator::InitializeGroupConfig(
const GroupConfig& group_config) { … }
void FeatureConfigEventStorageValidator::InitializeEventConfig(
const EventConfig& event_config) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH)
void FeatureConfigEventStorageValidator::InitializeEventPrefixes(
const Configuration& configuration) {
const auto& prefixes = configuration.GetRegisteredAllowedEventPrefixes();
should_store_event_name_prefixes_.insert(prefixes.begin(), prefixes.end());
}
#endif
}