#include "chrome/browser/component_updater/soda_language_pack_component_installer.h"
#include <iterator>
#include <memory>
#include <string>
#include <vector>
#include "base/containers/flat_set.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/notreached.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "base/version.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/component_updater/soda_component_installer.h"
#include "components/component_updater/component_updater_service.h"
#include "components/crx_file/id_util.h"
#include "components/prefs/pref_service.h"
#include "components/soda/constants.h"
#include "components/update_client/update_client_errors.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
namespace component_updater {
namespace {
constexpr char kLanguagePackManifestName[] = …;
}
SodaLanguagePackComponentInstallerPolicy::
SodaLanguagePackComponentInstallerPolicy(
speech::SodaLanguagePackComponentConfig language_config,
PrefService* prefs,
OnSodaLanguagePackComponentReadyCallback on_ready_callback)
: … { … }
SodaLanguagePackComponentInstallerPolicy::
~SodaLanguagePackComponentInstallerPolicy() { … }
std::string SodaLanguagePackComponentInstallerPolicy::GetExtensionId(
speech::LanguageCode language_code) { … }
base::flat_set<std::string>
SodaLanguagePackComponentInstallerPolicy::GetExtensionIds() { … }
void SodaLanguagePackComponentInstallerPolicy::
UpdateSodaLanguagePackComponentOnDemand(
speech::LanguageCode language_code) { … }
bool SodaLanguagePackComponentInstallerPolicy::VerifyInstallation(
const base::Value::Dict& manifest,
const base::FilePath& install_dir) const { … }
bool SodaLanguagePackComponentInstallerPolicy::
SupportsGroupPolicyEnabledComponentUpdates() const { … }
bool SodaLanguagePackComponentInstallerPolicy::RequiresNetworkEncryption()
const { … }
update_client::CrxInstaller::Result
SodaLanguagePackComponentInstallerPolicy::OnCustomInstall(
const base::Value::Dict& manifest,
const base::FilePath& install_dir) { … }
void SodaLanguagePackComponentInstallerPolicy::OnCustomUninstall() { … }
void SodaLanguagePackComponentInstallerPolicy::ComponentReady(
const base::Version& version,
const base::FilePath& install_dir,
base::Value::Dict manifest) { … }
base::FilePath SodaLanguagePackComponentInstallerPolicy::GetRelativeInstallDir()
const { … }
void SodaLanguagePackComponentInstallerPolicy::GetHash(
std::vector<uint8_t>* hash) const { … }
std::string SodaLanguagePackComponentInstallerPolicy::GetName() const { … }
update_client::InstallerAttributes
SodaLanguagePackComponentInstallerPolicy::GetInstallerAttributes() const { … }
void RegisterSodaLanguagePackComponent(
speech::SodaLanguagePackComponentConfig language_config,
ComponentUpdateService* cus,
PrefService* prefs,
OnSodaLanguagePackComponentReadyCallback on_ready_callback) { … }
}