chromium/components/optimization_guide/core/model_execution/model_execution_features.cc

// Copyright 2023 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/optimization_guide/core/model_execution/model_execution_features.h"

#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/metrics/field_trial_params.h"
#include "base/notreached.h"
#include "components/optimization_guide/core/model_execution/feature_keys.h"
#include "components/optimization_guide/core/optimization_guide_features.h"

namespace optimization_guide {
namespace features {
namespace internal {

// Settings visibility features.
BASE_FEATURE();
BASE_FEATURE();
BASE_FEATURE();
BASE_FEATURE();

const base::FeatureParam<std::string> kPerformanceClassListForHistorySearch(
    &kHistorySearchSettingsVisibility,
    "PerformanceClassListForHistorySearch",
    "*");

// Graduation features.

// Note: ComposeGraduated is enabled by default because the feature is
// country-restricted at runtime.
BASE_FEATURE();
BASE_FEATURE();
BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

BASE_FEATURE();

bool IsGraduatedFeature(UserVisibleFeatureKey feature) {}

const base::Feature* GetFeatureToUseToCheckSettingsVisibility(
    UserVisibleFeatureKey feature) {}

base::flat_set<UserVisibleFeatureKey> GetAllowedFeaturesForUnsignedUser() {}

bool ShouldEnableFeatureWhenMainToggleOn(UserVisibleFeatureKey feature) {}

// LINT.IfChange(IsOnDeviceModelEnabled)
//
// On-device supported features should return true.
// `GetOnDeviceFeatureRecentlyUsedPref` should return a valid pref for each
// on-device feature.
// Due to limitations of the gerrit IFTTT analyzer(b/249297195),
// multiple paths are not supported.
// Be sure to edit `IsOnDeviceModelAdaptationEnabled` as well if you edit this
// function.
bool IsOnDeviceModelEnabled(ModelBasedCapabilityKey feature) {}
// LINT.ThenChange(//components/optimization_guide/core/model_execution/model_execution_prefs.cc:GetOnDeviceFeatureRecentlyUsedPref)

// LINT.IfChange(IsOnDeviceModelAdaptationEnabled)
//
// On-device model adaptation features should return true.
// `GetOptimizationTargetForModelAdaptation` should return a valid optimization
// target for each on-device model adaptation feature, that will be used to
// download the adaptation model.
bool IsOnDeviceModelAdaptationEnabled(ModelBasedCapabilityKey feature) {}
// LINT.ThenChange(//components/optimization_guide/core/model_execution/model_execution_features.cc:IsOnDeviceModelEnabled)

proto::OptimizationTarget GetOptimizationTargetForModelAdaptation(
    ModelBasedCapabilityKey feature_key) {}

}  // namespace internal

}  // namespace features

}  // namespace optimization_guide