chromium/components/segmentation_platform/embedder/default_model/android_home_module_ranker.cc

// 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.
#include "components/segmentation_platform/embedder/default_model/android_home_module_ranker.h"

#include <memory>

#include "base/metrics/field_trial_params.h"
#include "base/task/sequenced_task_runner.h"
#include "components/segmentation_platform/internal/metadata/metadata_writer.h"
#include "components/segmentation_platform/public/config.h"
#include "components/segmentation_platform/public/constants.h"
#include "components/segmentation_platform/public/features.h"
#include "components/segmentation_platform/public/proto/aggregation.pb.h"
#include "components/segmentation_platform/public/proto/model_metadata.pb.h"

namespace segmentation_platform {

namespace {
SegmentId;

// Default parameters for AndroidHomeModuleRanker model.
constexpr SegmentId kSegmentId =;
constexpr int64_t kModelVersion =;
// Store 28 buckets of input data (28 days).
constexpr int64_t kSignalStorageLength =;
// Wait until we have 0 days of data.
constexpr int64_t kMinSignalCollectionLength =;
// Refresh the result every time.
constexpr int64_t kResultTTLMinutes =;

constexpr std::array<const char*, 4> kAndroidHomeModuleLabels =;

constexpr std::array<const char*, 4> kAndroidHomeModuleInputContextKeys =;

// InputFeatures.

// Enum values for the MagicStack.Clank.NewTabPage|StartSurface.Module.Click and
// MagicStack.Clank.NewTabPage|StartSurface.Module.TopImpressionV2 histograms.
constexpr std::array<int32_t, 1> kEnumValueForSingleTab{};

constexpr std::array<int32_t, 1> kEnumValueForPriceChange{};

constexpr std::array<int32_t, 1> kEnumValueForTabResumption{};

constexpr std::array<int32_t, 1> kEnumValueForSafetyHub{};

// Set UMA metrics to use as input.
constexpr std::array<MetadataWriter::UMAFeature, 8> kUMAFeatures =;

float TransformFreshness(float freshness_score, float freshness_threshold) {}

}  // namespace

// static
std::unique_ptr<Config> AndroidHomeModuleRanker::GetConfig() {}

AndroidHomeModuleRanker::AndroidHomeModuleRanker()
    :{}

std::unique_ptr<DefaultModelProvider::ModelConfig>
AndroidHomeModuleRanker::GetModelConfig() {}

void AndroidHomeModuleRanker::ExecuteModelWithInput(
    const ModelProvider::Request& inputs,
    ExecutionCallback callback) {}
}  // namespace segmentation_platform