chromium/components/visited_url_ranking/public/url_visit_util.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/public/url_visit_util.h"

#include <math.h>

#include <array>
#include <optional>
#include <string>

#include "base/memory/scoped_refptr.h"
#include "base/metrics/field_trial_params.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "components/segmentation_platform/public/input_context.h"
#include "components/segmentation_platform/public/types/processed_value.h"
#include "components/url_deduplication/deduplication_strategy.h"
#include "components/url_deduplication/docs_url_strip_handler.h"
#include "components/url_deduplication/url_deduplication_helper.h"
#include "components/url_deduplication/url_strip_handler.h"
#include "components/visited_url_ranking/public/features.h"
#include "components/visited_url_ranking/public/fetch_result.h"
#include "components/visited_url_ranking/public/url_visit_schema.h"
#include "url/gurl.h"

InputContext;
ProcessedValue;

namespace visited_url_ranking {

namespace {

// Bucketize the value to exponential buckets. Returns lower bound of the bucket.
float BucketizeExp(int64_t value, int max_buckets) {}

// Used as input to the model, it is ok to group some platforms together. Only
// lists platforms that use the service.
enum class PlatformType {};

PlatformType GetPlatformInput() {}

int GetPriority(DecorationType type) {}

}  // namespace

std::unique_ptr<url_deduplication::URLDeduplicationHelper>
CreateDefaultURLDeduplicationHelper() {}

URLMergeKey ComputeURLMergeKey(
    const GURL& url,
    const std::u16string& title,
    url_deduplication::URLDeduplicationHelper* deduplication_helper) {}

scoped_refptr<InputContext> AsInputContext(
    const std::array<FieldSchema, kNumInputs>& fields_schema,
    const URLVisitAggregate& url_visit_aggregate) {}

const URLVisitAggregate::TabData* GetTabDataIfExists(
    const URLVisitAggregate& url_visit_aggregate) {}

const URLVisitAggregate::Tab* GetTabIfExists(
    const URLVisitAggregate& url_visit_aggregate) {}

const history::AnnotatedVisit* GetHistoryEntryVisitIfExists(
    const URLVisitAggregate& url_visit_aggregate) {}

const Decoration& GetMostRelevantDecoration(
    const URLVisitAggregate& url_visit_aggregate) {}

}  // namespace visited_url_ranking