#include "components/segmentation_platform/embedder/default_model/ios_module_ranker.h"
#include <memory>
#include "base/command_line.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/metrics_hashes.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/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;
constexpr SegmentId kSegmentId = …;
constexpr SegmentId kTestSegmentId = …;
constexpr int64_t kModelVersion = …;
constexpr int64_t kSignalStorageLength = …;
constexpr int64_t kMinSignalCollectionLength = …;
constexpr int64_t kResultTTLMinutes = …;
constexpr std::array<const char*, 5> kIosModuleLabels = …;
constexpr std::array<const char*, 5> kIosModuleInputContextKeys = …;
constexpr char kClickHistogram[] = …;
constexpr std::array<float, 1> kOutputFeatureDefaultValue{ … };
constexpr std::array<MetadataWriter::UMAFeature, 1> kOutputFeatures = …;
constexpr std::array<int32_t, 1> kEnumValueForMVT{ … };
constexpr std::array<int32_t, 1> kEnumValueForShortcuts{ … };
constexpr std::array<int32_t, 1> kEnumValueForSafetyCheck{ … };
constexpr std::array<int32_t, 1> kEnumValueForTabResumption{ … };
constexpr std::array<int32_t, 1> kEnumValueForParcelTracking{ … };
constexpr std::array<MetadataWriter::UMAFeature, 30> kUMAFeatures = …;
float TransformFreshness(float freshness_score, float freshness_threshold) { … }
}
std::unique_ptr<Config> IosModuleRanker::GetConfig() { … }
IosModuleRanker::IosModuleRanker() : … { … }
std::unique_ptr<DefaultModelProvider::ModelConfig>
IosModuleRanker::GetModelConfig() { … }
void IosModuleRanker::ExecuteModelWithInput(
const ModelProvider::Request& inputs,
ExecutionCallback callback) { … }
std::unique_ptr<Config> TestIosModuleRanker::GetConfig() { … }
TestIosModuleRanker::TestIosModuleRanker()
: … { … }
std::unique_ptr<DefaultModelProvider::ModelConfig>
TestIosModuleRanker::GetModelConfig() { … }
void TestIosModuleRanker::ExecuteModelWithInput(
const ModelProvider::Request& inputs,
ExecutionCallback callback) { … }
}