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

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/segmentation_platform/embedder/default_model/database_api_clients.h"

#include <memory>
#include <set>
#include <string>
#include <string_view>

#include "base/logging.h"
#include "base/metrics/metrics_hashes.h"
#include "base/strings/stringprintf.h"
#include "components/segmentation_platform/internal/database/ukm_types.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/model_provider.h"
#include "components/segmentation_platform/public/proto/model_metadata.pb.h"

namespace segmentation_platform {

namespace {
SegmentId;
constexpr SegmentId kSegmentId =;
constexpr int64_t kModelVersion =;

// List of custom events used by DatabaseClient API users.
// TODO(ssid): Add TTL for the custom events to be deleted. Currently they will
// get deleted after `kUkmEntriesTTL`.
struct CustomEvent {};

// ----------------------------------------------------------------------------
// List of metrics stored in database by DatabaseClient API users.
// TODO(ssid): UMA and UKM metrics can be listed here, add examples.
constexpr std::array<const char*, 3> kTestMetricNames{};

// TODO(ssid): Document the purpose and meaning of empty metric names.
constexpr std::array<CustomEvent, 3> kRegisteredCustomEvents{};
// End of metrics list.
// ----------------------------------------------------------------------------

void AddCustomEvent(const CustomEvent& custom_event, MetadataWriter& writer) {}

}  // namespace

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

// static
void DatabaseApiClients::AddSumGroupQuery(
    MetadataWriter& writer,
    std::string_view event_name,
    const std::set<std::string>& metric_names,
    int days) {}

// static
void DatabaseApiClients::AddSumQuery(MetadataWriter& writer,
                                     std::string_view metric_name,
                                     int days) {}

DatabaseApiClients::DatabaseApiClients() :{}

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

void DatabaseApiClients::ExecuteModelWithInput(
    const ModelProvider::Request& inputs,
    ExecutionCallback callback) {}

}  // namespace segmentation_platform