#include "components/omnibox/browser/autocomplete_scoring_model_service.h"
#include <optional>
#include <utility>
#include "base/functional/callback.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/trace_event/common/trace_event_common.h"
#include "components/omnibox/browser/autocomplete_scoring_model_executor.h"
#include "components/omnibox/browser/autocomplete_scoring_model_handler.h"
#include "components/omnibox/browser/omnibox_field_trial.h"
#include "components/optimization_guide/core/optimization_guide_model_provider.h"
#include "components/optimization_guide/proto/models.pb.h"
namespace {
void LogMLScoreCacheHit(bool cache_hit) { … }
}
AutocompleteScoringModelService::AutocompleteScoringModelService(
optimization_guide::OptimizationGuideModelProvider* model_provider)
: … { … }
AutocompleteScoringModelService::~AutocompleteScoringModelService() = default;
void AutocompleteScoringModelService::AddOnModelUpdatedCallback(
base::OnceClosure callback) { … }
int AutocompleteScoringModelService::GetModelVersion() const { … }
std::vector<AutocompleteScoringModelService::Result>
AutocompleteScoringModelService::BatchScoreAutocompleteUrlMatchesSync(
const std::vector<const ScoringSignals*>& batch_scoring_signals) { … }
bool AutocompleteScoringModelService::UrlScoringModelAvailable() { … }