chromium/content/browser/preloading/preloading_prediction.cc

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

#include "content/browser/preloading/preloading_prediction.h"

#include "base/metrics/histogram_functions.h"
#include "base/strings/strcat.h"
#include "content/public/browser/page.h"
#include "services/metrics/public/cpp/metrics_utils.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_recorder.h"

namespace content {

PreloadingPrediction::PreloadingPrediction(
    PreloadingPredictor predictor,
    PreloadingConfidence confidence,
    ukm::SourceId triggered_primary_page_source_id,
    PreloadingURLMatchCallback url_match_predicate)
    :{}

PreloadingPrediction::~PreloadingPrediction() = default;
PreloadingPrediction::PreloadingPrediction(PreloadingPrediction&&) = default;
PreloadingPrediction& PreloadingPrediction::operator=(PreloadingPrediction&&) =
    default;

void PreloadingPrediction::RecordPreloadingPredictionUKMs(
    ukm::SourceId navigated_page_source_id,
    std::optional<double> sampling_likelihood) {}

void PreloadingPrediction::SetIsAccuratePrediction(const GURL& navigated_url) {}

ExperimentalPreloadingPrediction::ExperimentalPreloadingPrediction(
    std::string_view name,
    PreloadingURLMatchCallback url_match_predicate,
    float score,
    float min_score,
    float max_score,
    size_t buckets)
    :{}

void ExperimentalPreloadingPrediction::SetIsAccuratePrediction(
    const GURL& navigated_url) {}

ExperimentalPreloadingPrediction::~ExperimentalPreloadingPrediction() = default;
ExperimentalPreloadingPrediction::ExperimentalPreloadingPrediction(
    ExperimentalPreloadingPrediction&&) = default;
ExperimentalPreloadingPrediction& ExperimentalPreloadingPrediction::operator=(
    ExperimentalPreloadingPrediction&&) = default;

void ExperimentalPreloadingPrediction::RecordToUMA() const {}

ModelPredictionTrainingData::ModelPredictionTrainingData(
    OutcomeCallback on_record_outcome,
    PreloadingURLMatchCallback url_match_predicate)
    :{}
ModelPredictionTrainingData::~ModelPredictionTrainingData() = default;
ModelPredictionTrainingData::ModelPredictionTrainingData(
    ModelPredictionTrainingData&&) = default;
ModelPredictionTrainingData& ModelPredictionTrainingData::operator=(
    ModelPredictionTrainingData&&) = default;

void ModelPredictionTrainingData::SetIsAccuratePrediction(
    const GURL& navigated_url) {}

void ModelPredictionTrainingData::Record(
    std::optional<double> sampling_likelihood) {}

}  // namespace content