#include "components/component_updater/installer_policies/on_device_head_suggest_component_installer.h"
#include <cstdint>
#include <memory>
#include <string>
#include <vector>
#include "base/files/file_util.h"
#include "base/functional/callback.h"
#include "base/metrics/field_trial_params.h"
#include "base/path_service.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "components/component_updater/component_installer.h"
#include "components/component_updater/component_updater_service.h"
#include "components/omnibox/browser/omnibox_field_trial.h"
#include "components/omnibox/browser/on_device_model_update_listener.h"
namespace component_updater {
namespace {
const uint8_t kOnDeviceHeadSuggestPublicKeySHA256[32] = …;
std::string GetNormalizedLocale(const std::string& raw_locale) { … }
}
OnDeviceHeadSuggestInstallerPolicy::OnDeviceHeadSuggestInstallerPolicy(
const std::string& locale)
: … { … }
OnDeviceHeadSuggestInstallerPolicy::~OnDeviceHeadSuggestInstallerPolicy() =
default;
bool OnDeviceHeadSuggestInstallerPolicy::VerifyInstallation(
const base::Value::Dict& manifest,
const base::FilePath& install_dir) const { … }
bool OnDeviceHeadSuggestInstallerPolicy::
SupportsGroupPolicyEnabledComponentUpdates() const { … }
bool OnDeviceHeadSuggestInstallerPolicy::RequiresNetworkEncryption() const { … }
update_client::CrxInstaller::Result
OnDeviceHeadSuggestInstallerPolicy::OnCustomInstall(
const base::Value::Dict& manifest,
const base::FilePath& install_dir) { … }
void OnDeviceHeadSuggestInstallerPolicy::OnCustomUninstall() { … }
void OnDeviceHeadSuggestInstallerPolicy::ComponentReady(
const base::Version& version,
const base::FilePath& install_dir,
base::Value::Dict manifest) { … }
base::FilePath OnDeviceHeadSuggestInstallerPolicy::GetRelativeInstallDir()
const { … }
void OnDeviceHeadSuggestInstallerPolicy::GetHash(
std::vector<uint8_t>* hash) const { … }
std::string OnDeviceHeadSuggestInstallerPolicy::GetName() const { … }
update_client::InstallerAttributes
OnDeviceHeadSuggestInstallerPolicy::GetInstallerAttributes() const { … }
void RegisterOnDeviceHeadSuggestComponent(ComponentUpdateService* cus,
const std::string& locale) { … }
}