chromium/components/segmentation_platform/internal/scheduler/execution_service.cc

// Copyright 2022 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/segmentation_platform/internal/scheduler/execution_service.h"

#include "base/memory/raw_ptr.h"
#include "base/task/sequenced_task_runner.h"
#include "components/prefs/pref_service.h"
#include "components/segmentation_platform/internal/database/cached_result_provider.h"
#include "components/segmentation_platform/internal/database/storage_service.h"
#include "components/segmentation_platform/internal/execution/execution_request.h"
#include "components/segmentation_platform/internal/execution/model_executor_impl.h"
#include "components/segmentation_platform/internal/execution/processing/feature_aggregator_impl.h"
#include "components/segmentation_platform/internal/execution/processing/feature_list_query_processor.h"
#include "components/segmentation_platform/internal/scheduler/model_execution_scheduler_impl.h"
#include "components/segmentation_platform/internal/segmentation_ukm_helper.h"
#include "components/segmentation_platform/internal/signals/signal_handler.h"
#include "components/segmentation_platform/public/config.h"
#include "components/segmentation_platform/public/input_delegate.h"
#include "components/segmentation_platform/public/model_provider.h"
#include "components/segmentation_platform/public/proto/model_metadata.pb.h"

namespace segmentation_platform {

ExecutionService::ExecutionService() = default;
ExecutionService::~ExecutionService() = default;

void ExecutionService::InitForTesting(
    std::unique_ptr<processing::FeatureListQueryProcessor> feature_processor,
    std::unique_ptr<ModelExecutor> executor,
    std::unique_ptr<ModelExecutionScheduler> scheduler,
    ModelManager* model_manager) {}

void ExecutionService::Initialize(
    StorageService* storage_service,
    SignalHandler* signal_handler,
    base::Clock* clock,
    scoped_refptr<base::SequencedTaskRunner> task_runner,
    const base::flat_set<SegmentId>& legacy_output_segment_ids,
    ModelProviderFactory* model_provider_factory,
    std::vector<raw_ptr<ModelExecutionScheduler::Observer,
                        VectorExperimental>>&& observers,
    const PlatformOptions& platform_options,
    std::unique_ptr<processing::InputDelegateHolder> input_delegate_holder,
    PrefService* profile_prefs,
    CachedResultProvider* cached_result_provider) {}

void ExecutionService::OnNewModelInfoReadyLegacy(
    const proto::SegmentInfo& segment_info) {}

ModelProvider* ExecutionService::GetModelProvider(SegmentId segment_id,
                                                  ModelSource model_source) {}

void ExecutionService::RequestModelExecution(
    std::unique_ptr<ExecutionRequest> request) {}

void ExecutionService::OverwriteModelExecutionResult(
    proto::SegmentId segment_id,
    const std::pair<float, ModelExecutionStatus>& result) {}

void ExecutionService::RefreshModelResults() {}

void ExecutionService::RunDailyTasks(bool is_startup) {}

}  // namespace segmentation_platform