#include "components/page_content_annotations/core/page_content_annotations_model_manager.h"
#include "base/feature_list.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros_local.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
#include "components/optimization_guide/core/optimization_guide_model_provider.h"
#include "components/page_content_annotations/core/page_content_annotations_features.h"
namespace page_content_annotations {
namespace {
base::TaskTraits GetTaskTraits() { … }
}
PageContentAnnotationsModelManager::PageContentAnnotationsModelManager(
optimization_guide::OptimizationGuideModelProvider*
optimization_guide_model_provider)
: … { … }
PageContentAnnotationsModelManager::~PageContentAnnotationsModelManager() =
default;
void PageContentAnnotationsModelManager::SetUpPageVisibilityModel(
optimization_guide::OptimizationGuideModelProvider*
optimization_guide_model_provider) { … }
void PageContentAnnotationsModelManager::RequestAndNotifyWhenModelAvailable(
AnnotationType type,
base::OnceCallback<void(bool)> callback) { … }
std::optional<optimization_guide::ModelInfo>
PageContentAnnotationsModelManager::GetModelInfoForType(
AnnotationType type) const { … }
void PageContentAnnotationsModelManager::Annotate(
BatchAnnotationCallback callback,
const std::vector<std::string>& inputs,
AnnotationType annotation_type) { … }
void PageContentAnnotationsModelManager::OnJobExecutionComplete() { … }
void PageContentAnnotationsModelManager::MaybeStartNextAnnotationJob() { … }
}