chromium/components/translate/core/browser/translate_model_service.cc

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

#include "components/translate/core/browser/translate_model_service.h"

#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/metrics/histogram_macros.h"
#include "base/task/sequenced_task_runner.h"
#include "components/optimization_guide/core/optimization_guide_model_provider.h"
#include "components/optimization_guide/proto/models.pb.h"
#include "mojo/public/cpp/bindings/pending_remote.h"

namespace {

// Load the model file at the provided file path.
base::File LoadModelFile(const base::FilePath& model_file_path) {}

// Close the provided model file.
void CloseModelFile(base::File model_file) {}

// Util class for recording the result of loading the detection model. The
// result is recorded when it goes out of scope and its destructor is called.
class ScopedModelLoadingResultRecorder {};

// The maximum number of pending model requests allowed to be kept
// by the TranslateModelService.
constexpr int kMaxPendingRequestsAllowed =;

}  // namespace

namespace translate {

TranslateModelService::TranslateModelService(
    optimization_guide::OptimizationGuideModelProvider* opt_guide,
    const scoped_refptr<base::SequencedTaskRunner>& background_task_runner)
    :{}

TranslateModelService::~TranslateModelService() {}

void TranslateModelService::Shutdown() {}

void TranslateModelService::UnloadModelFile() {}

void TranslateModelService::NotifyModelUpdatesAndClear(
    bool is_model_available) {}

void TranslateModelService::OnModelUpdated(
    optimization_guide::proto::OptimizationTarget optimization_target,
    base::optional_ref<const optimization_guide::ModelInfo> model_info) {}

void TranslateModelService::OnModelFileLoaded(base::File model_file) {}

base::File TranslateModelService::GetLanguageDetectionModelFile() {}

void TranslateModelService::NotifyOnModelFileAvailable(
    NotifyModelAvailableCallback callback) {}
}  // namespace translate