#include "components/user_annotations/user_annotations_service.h"
#include "base/metrics/histogram_macros_local.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "components/autofill/core/common/form_data.h"
#include "components/optimization_guide/core/optimization_guide_model_executor.h"
#include "components/optimization_guide/core/optimization_guide_proto_util.h"
#include "components/optimization_guide/core/optimization_guide_util.h"
#include "components/optimization_guide/proto/features/common_quality_data.pb.h"
#include "components/optimization_guide/proto/features/forms_annotations.pb.h"
#include "components/user_annotations/user_annotations_database.h"
#include "components/user_annotations/user_annotations_features.h"
#include "components/user_annotations/user_annotations_types.h"
namespace user_annotations {
namespace {
void RecordUserAnnotationsService(bool success) { … }
}
UserAnnotationsService::UserAnnotationsService(
optimization_guide::OptimizationGuideModelExecutor* model_executor,
const base::FilePath& storage_dir)
: … { … }
UserAnnotationsService::~UserAnnotationsService() = default;
void UserAnnotationsService::AddFormSubmission(
optimization_guide::proto::AXTreeUpdate ax_tree_update,
const autofill::FormData& form_data) { … }
void UserAnnotationsService::RetrieveAllEntries(
base::OnceCallback<
void(std::vector<optimization_guide::proto::UserAnnotationsEntry>)>
callback) { … }
void UserAnnotationsService::Shutdown() { … }
void UserAnnotationsService::OnModelExecuted(
optimization_guide::OptimizationGuideModelExecutionResult result,
std::unique_ptr<optimization_guide::ModelQualityLogEntry> log_entry) { … }
}