chromium/components/feature_engagement/internal/editable_configuration.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/feature_engagement/internal/editable_configuration.h"

#include <map>

#include "base/check.h"
#include "base/feature_list.h"
#include "base/not_fatal_until.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/feature_engagement/public/configuration.h"

#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "components/feature_engagement/public/configuration_provider.h"
#endif

namespace feature_engagement {

EditableConfiguration::EditableConfiguration() = default;

EditableConfiguration::~EditableConfiguration() = default;

void EditableConfiguration::SetConfiguration(
    const base::Feature* feature,
    const FeatureConfig& feature_config) {}

void EditableConfiguration::SetConfiguration(const base::Feature* group,
                                             const GroupConfig& group_config) {}

void EditableConfiguration::AddAllowedEventPrefix(const std::string& prefix) {}

const FeatureConfig& EditableConfiguration::GetFeatureConfig(
    const base::Feature& feature) const {}

const FeatureConfig& EditableConfiguration::GetFeatureConfigByName(
    const std::string& feature_name) const {}

const Configuration::ConfigMap&
EditableConfiguration::GetRegisteredFeatureConfigs() const {}

const std::vector<std::string> EditableConfiguration::GetRegisteredFeatures()
    const {}

const GroupConfig& EditableConfiguration::GetGroupConfig(
    const base::Feature& group) const {}

const GroupConfig& EditableConfiguration::GetGroupConfigByName(
    const std::string& group_name) const {}

const Configuration::GroupConfigMap&
EditableConfiguration::GetRegisteredGroupConfigs() const {}

const std::vector<std::string> EditableConfiguration::GetRegisteredGroups()
    const {}

#if BUILDFLAG(IS_CHROMEOS_ASH)
void EditableConfiguration::UpdateConfig(
    const base::Feature& feature,
    const ConfigurationProvider* provider) {
  FeatureConfig& config = configs_[feature.name];

  // Clear existing configs.
  config = FeatureConfig();
  provider->MaybeProvideFeatureConfiguration(feature, config, {}, {});
}

const Configuration::EventPrefixSet&
EditableConfiguration::GetRegisteredAllowedEventPrefixes() const {
  return event_prefixes_;
}
#endif

}  // namespace feature_engagement