chromium/components/optimization_guide/core/model_execution/on_device_model_adaptation_loader.h

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

#include <optional>

#include "base/memory/scoped_refptr.h"
#include "base/scoped_observation.h"
#include "base/task/sequenced_task_runner.h"
#include "base/types/expected.h"
#include "base/types/optional_util.h"
#include "components/optimization_guide/core/model_execution/feature_keys.h"
#include "components/optimization_guide/core/model_execution/on_device_model_component.h"
#include "components/optimization_guide/core/optimization_target_model_observer.h"
#include "components/optimization_guide/proto/on_device_model_execution_config.pb.h"
#include "services/on_device_model/public/cpp/model_assets.h"

namespace optimization_guide {

class OnDeviceModelFeatureAdapter;
class OnDeviceModelMetadata;
class OptimizationGuideModelProvider;
enum class OnDeviceModelAdaptationAvailability;

class OnDeviceModelAdaptationMetadata {};

// Loads model adaptation assets for a particular feature. Performs adaptation
// model compatibility checks with the base model and reloads the assets if the
// base model changes.
class OnDeviceModelAdaptationLoader
    : public OptimizationTargetModelObserver,
      public OnDeviceModelComponentStateManager::Observer {};

}  // namespace optimization_guide

#endif  // COMPONENTS_OPTIMIZATION_GUIDE_CORE_MODEL_EXECUTION_ON_DEVICE_MODEL_ADAPTATION_LOADER_H_