#include "chrome/browser/accessibility/phrase_segmentation/dependency_parser_model_loader.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/metrics/histogram_macros.h"
#include "components/optimization_guide/core/optimization_guide_model_provider.h"
namespace {
base::File LoadModelFile(const base::FilePath& model_file_path) { … }
void CloseModelFile(base::File model_file) { … }
class ScopedModelLoadingResultRecorder { … };
constexpr int kMaxPendingRequestsAllowed = …;
}
DependencyParserModelLoader::DependencyParserModelLoader(
optimization_guide::OptimizationGuideModelProvider* opt_guide,
const scoped_refptr<base::SequencedTaskRunner>& background_task_runner)
: … { … }
DependencyParserModelLoader::~DependencyParserModelLoader() { … }
void DependencyParserModelLoader::Shutdown() { … }
void DependencyParserModelLoader::UnloadModelFile() { … }
void DependencyParserModelLoader::NotifyModelUpdatesAndClear(
bool is_model_available) { … }
void DependencyParserModelLoader::OnModelUpdated(
optimization_guide::proto::OptimizationTarget optimization_target,
base::optional_ref<const optimization_guide::ModelInfo> model_info) { … }
void DependencyParserModelLoader::OnModelFileLoaded(base::File model_file) { … }
base::File DependencyParserModelLoader::GetDependencyParserModelFile() { … }
void DependencyParserModelLoader::NotifyOnModelFileAvailable(
NotifyModelAvailableCallback callback) { … }