chromium/components/visited_url_ranking/internal/transformer/url_visit_aggregates_segmentation_metrics_transformer.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/visited_url_ranking/internal/transformer/url_visit_aggregates_segmentation_metrics_transformer.h"

#include <memory>
#include <set>
#include <vector>

#include "base/functional/callback.h"
#include "base/scoped_observation.h"
#include "base/strings/stringprintf.h"
#include "base/task/sequenced_task_runner.h"
#include "components/segmentation_platform/embedder/default_model/database_api_clients.h"
#include "components/segmentation_platform/internal/metadata/metadata_writer.h"
#include "components/segmentation_platform/public/database_client.h"
#include "components/segmentation_platform/public/segmentation_platform_service.h"
#include "components/segmentation_platform/public/service_proxy.h"
#include "components/visited_url_ranking/public/url_visit.h"
#include "components/visited_url_ranking/public/url_visit_schema.h"
#include "components/visited_url_ranking/public/visited_url_ranking_service.h"

namespace {

// A metric name substring used for capturing the total number of times visit
// suggestions based on a given aggregate were seen for a given day range.
const char kSeenCount[] =;

// A metric name substring used for capturing the total number of times visit
// suggestions based on a given aggregate were activated for a given day range.
const char kActivatedCount[] =;

// A metric name substring used for capturing the total number of times visit
// suggestions based on a given aggregate were dismissed for a given day range.
const char kDismissedCount[] =;

constexpr int kNumUserInteractionMetrics =;
constexpr std::array<const char*, kNumUserInteractionMetrics>
    kUserInteractionMetrics{};

// Helper function to populate time period specific user interaction signal for
// input context creation.
void AddUserInteractionSignal(std::map<std::string, float>& metrics,
                              int day_range,
                              const char* name,
                              int count) {}

}  // namespace

namespace visited_url_ranking {

class URLVisitAggregatesSegmentationMetricsTransformer::SegmentationInitObserver
    : public segmentation_platform::ServiceProxy::Observer {};

URLVisitAggregatesSegmentationMetricsTransformer::
    URLVisitAggregatesSegmentationMetricsTransformer(
        segmentation_platform::SegmentationPlatformService* sps)
    :{}

URLVisitAggregatesSegmentationMetricsTransformer::
    ~URLVisitAggregatesSegmentationMetricsTransformer() = default;

void URLVisitAggregatesSegmentationMetricsTransformer::Transform(
    std::vector<URLVisitAggregate> aggregates,
    const FetchOptions& options,
    OnTransformCallback callback) {}

void URLVisitAggregatesSegmentationMetricsTransformer::OnMetricsQueryDataReady(
    std::vector<URLVisitAggregate> url_visit_aggregates,
    OnTransformCallback callback,
    segmentation_platform::DatabaseClient::ResultStatus status,
    const segmentation_platform::ModelProvider::Request& result) {}

}  // namespace visited_url_ranking