#include "components/optimization_guide/core/model_execution/on_device_model_adaptation_controller.h"
#include "base/metrics/histogram_functions.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/types/optional_ref.h"
#include "components/optimization_guide/core/model_execution/feature_keys.h"
#include "components/optimization_guide/core/model_execution/model_execution_features.h"
#include "components/optimization_guide/core/model_execution/model_execution_util.h"
#include "components/optimization_guide/core/model_execution/on_device_model_access_controller.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
#include "services/on_device_model/public/cpp/model_assets.h"
#include "services/on_device_model/public/mojom/on_device_model.mojom.h"
namespace optimization_guide {
OnDeviceModelAdaptationController::OnDeviceModelAdaptationController(
ModelBasedCapabilityKey feature,
base::WeakPtr<OnDeviceModelServiceController> controller)
: … { … }
OnDeviceModelAdaptationController::~OnDeviceModelAdaptationController() =
default;
mojo::Remote<on_device_model::mojom::OnDeviceModel>&
OnDeviceModelAdaptationController::GetOrCreateModelRemote(
const on_device_model::AdaptationAssetPaths& adaptation_assets) { … }
void OnDeviceModelAdaptationController::OnAdaptationAssetsLoaded(
mojo::PendingReceiver<on_device_model::mojom::OnDeviceModel> model,
on_device_model::AdaptationAssets assets) { … }
void OnDeviceModelAdaptationController::OnLoadModelResult(
on_device_model::mojom::LoadModelResult result) { … }
}