#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/component_updater/file_type_policies_component_installer.h"
#include <memory>
#include <string>
#include <utility>
#include <vector>
#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/memory/ref_counted.h"
#include "base/path_service.h"
#include "base/task/thread_pool.h"
#include "base/version.h"
#include "components/component_updater/component_updater_paths.h"
#include "components/safe_browsing/content/common/file_type_policies.h"
ComponentUpdateService;
namespace {
const base::FilePath::CharType kFileTypePoliciesBinaryPbFileName[] = …);
const uint8_t kFileTypePoliciesPublicKeySHA256[32] = …;
const char kFileTypePoliciesManifestName[] = …;
void LoadFileTypesFromDisk(const base::FilePath& pb_path) { … }
}
namespace component_updater {
bool FileTypePoliciesComponentInstallerPolicy::
SupportsGroupPolicyEnabledComponentUpdates() const { … }
bool FileTypePoliciesComponentInstallerPolicy::RequiresNetworkEncryption()
const { … }
update_client::CrxInstaller::Result
FileTypePoliciesComponentInstallerPolicy::OnCustomInstall(
const base::Value::Dict& manifest,
const base::FilePath& install_dir) { … }
void FileTypePoliciesComponentInstallerPolicy::OnCustomUninstall() { … }
base::FilePath FileTypePoliciesComponentInstallerPolicy::GetInstalledPath(
const base::FilePath& base) { … }
void FileTypePoliciesComponentInstallerPolicy::ComponentReady(
const base::Version& version,
const base::FilePath& install_dir,
base::Value::Dict manifest) { … }
bool FileTypePoliciesComponentInstallerPolicy::VerifyInstallation(
const base::Value::Dict& manifest,
const base::FilePath& install_dir) const { … }
base::FilePath FileTypePoliciesComponentInstallerPolicy::GetRelativeInstallDir()
const { … }
void FileTypePoliciesComponentInstallerPolicy::GetHash(
std::vector<uint8_t>* hash) const { … }
std::string FileTypePoliciesComponentInstallerPolicy::GetName() const { … }
update_client::InstallerAttributes
FileTypePoliciesComponentInstallerPolicy::GetInstallerAttributes() const { … }
void RegisterFileTypePoliciesComponent(ComponentUpdateService* cus) { … }
}