#include "components/optimization_guide/core/model_execution/model_execution_util.h"
#include "base/files/file_util.h"
#include "components/optimization_guide/core/model_execution/model_execution_features.h"
#include "components/optimization_guide/core/model_execution/model_execution_prefs.h"
#include "components/optimization_guide/core/model_quality/feature_type_map.h"
#include "components/optimization_guide/core/model_util.h"
#include "components/optimization_guide/core/optimization_guide_constants.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
#include "components/prefs/pref_service.h"
#include "services/on_device_model/public/mojom/on_device_model.mojom.h"
#include "services/on_device_model/public/mojom/on_device_model_service.mojom.h"
namespace optimization_guide {
void SetExecutionRequest(
ModelBasedCapabilityKey feature,
proto::LogAiDataRequest& log_ai_request,
const google::protobuf::MessageLite& request_metadata) { … }
void SetExecutionResponse(ModelBasedCapabilityKey feature,
proto::LogAiDataRequest& log_ai_request,
const proto::Any& response_metadata) { … }
model_execution::prefs::GenAILocalFoundationalModelEnterprisePolicySettings
GetGenAILocalFoundationalModelEnterprisePolicySettings(
PrefService* local_state) { … }
OnDeviceModelLoadResult ConvertToOnDeviceModelLoadResult(
on_device_model::mojom::LoadModelResult result) { … }
std::unique_ptr<proto::OnDeviceModelExecutionConfig>
ReadOnDeviceModelExecutionConfig(const base::FilePath& config_path) { … }
bool WasOnDeviceEligibleFeatureRecentlyUsed(ModelBasedCapabilityKey feature,
const PrefService& local_state) { … }
}