#include "components/segmentation_platform/embedder/home_modules/ephemeral_home_module_backend.h"
#include <memory>
#include <vector>
#include "base/command_line.h"
#include "base/task/sequenced_task_runner.h"
#include "components/segmentation_platform/embedder/home_modules/card_selection_info.h"
#include "components/segmentation_platform/embedder/home_modules/card_selection_signals.h"
#include "components/segmentation_platform/embedder/home_modules/constants.h"
#include "components/segmentation_platform/embedder/home_modules/home_modules_card_registry.h"
#include "components/segmentation_platform/internal/metadata/metadata_writer.h"
#include "components/segmentation_platform/public/config.h"
#include "components/segmentation_platform/public/model_provider.h"
#include "components/segmentation_platform/public/proto/aggregation.pb.h"
#include "components/segmentation_platform/public/proto/model_metadata.pb.h"
namespace segmentation_platform::home_modules {
BASE_FEATURE(…);
namespace {
SegmentId;
constexpr SegmentId kSegmentId = …;
constexpr SegmentId kTestSegmentId = …;
constexpr int64_t kModelVersion = …;
constexpr int64_t kSignalStorageLength = …;
constexpr int64_t kMinSignalCollectionLength = …;
constexpr int64_t kResultTTLDays = …;
constexpr size_t kMaxOutputLabelsToRank = …;
constexpr char kEphemeralHomeModuleBackendUmaName[] = …;
}
std::unique_ptr<Config> EphemeralHomeModuleBackend::GetConfig(
HomeModulesCardRegistry* home_modules_card_registry) { … }
EphemeralHomeModuleBackend::EphemeralHomeModuleBackend(
base::WeakPtr<HomeModulesCardRegistry> home_modules_card_registry)
: … { … }
EphemeralHomeModuleBackend::~EphemeralHomeModuleBackend() = default;
std::unique_ptr<DefaultModelProvider::ModelConfig>
EphemeralHomeModuleBackend::GetModelConfig() { … }
void EphemeralHomeModuleBackend::ExecuteModelWithInput(
const ModelProvider::Request& inputs,
ExecutionCallback callback) { … }
std::unique_ptr<Config> TestEphemeralHomeModuleBackend::GetConfig() { … }
TestEphemeralHomeModuleBackend::TestEphemeralHomeModuleBackend()
: … { … }
std::unique_ptr<DefaultModelProvider::ModelConfig>
TestEphemeralHomeModuleBackend::GetModelConfig() { … }
void TestEphemeralHomeModuleBackend::ExecuteModelWithInput(
const ModelProvider::Request& inputs,
ExecutionCallback callback) { … }
}