#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/component_updater/installer_policies/masked_domain_list_component_installer_policy.h"
#include <optional>
#include "base/feature_list.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/logging.h"
#include "base/task/thread_pool.h"
#include "base/version.h"
#include "components/component_updater/component_installer.h"
#include "mojo/public/cpp/base/proto_wrapper.h"
#include "mojo/public/cpp/base/proto_wrapper_passkeys.h"
#include "services/network/public/cpp/features.h"
ComponentUpdateService;
namespace {
ListReadyRepeatingCallback;
constexpr uint8_t kMaskedDomainListPublicKeySHA256[32] = …;
constexpr char kMaskedDomainListManifestName[] = …;
constexpr char kExperimentalVersionAttributeName[] = …;
constexpr base::FilePath::CharType kMaskedDomainListRelativeInstallDir[] = …);
constexpr char kMaskedDomainListProto[] = …;
}
namespace component_updater {
class ReadMaskedDomainListProto { … };
MaskedDomainListComponentInstallerPolicy::
MaskedDomainListComponentInstallerPolicy(
ListReadyRepeatingCallback on_list_ready)
: … { … }
MaskedDomainListComponentInstallerPolicy::
~MaskedDomainListComponentInstallerPolicy() = default;
bool MaskedDomainListComponentInstallerPolicy::
SupportsGroupPolicyEnabledComponentUpdates() const { … }
bool MaskedDomainListComponentInstallerPolicy::IsEnabled() { … }
bool MaskedDomainListComponentInstallerPolicy::RequiresNetworkEncryption()
const { … }
update_client::CrxInstaller::Result
MaskedDomainListComponentInstallerPolicy::OnCustomInstall(
const base::Value::Dict& manifest,
const base::FilePath& install_dir) { … }
void MaskedDomainListComponentInstallerPolicy::OnCustomUninstall() { … }
base::FilePath MaskedDomainListComponentInstallerPolicy::GetInstalledPath(
const base::FilePath& base) { … }
void MaskedDomainListComponentInstallerPolicy::ComponentReady(
const base::Version& version,
const base::FilePath& install_dir,
base::Value::Dict manifest) { … }
bool MaskedDomainListComponentInstallerPolicy::VerifyInstallation(
const base::Value::Dict& manifest,
const base::FilePath& install_dir) const { … }
base::FilePath MaskedDomainListComponentInstallerPolicy::GetRelativeInstallDir()
const { … }
void MaskedDomainListComponentInstallerPolicy::GetHash(
std::vector<uint8_t>* hash) const { … }
void MaskedDomainListComponentInstallerPolicy::GetPublicKeyHash(
std::vector<uint8_t>* hash) { … }
std::string MaskedDomainListComponentInstallerPolicy::GetName() const { … }
update_client::InstallerAttributes
MaskedDomainListComponentInstallerPolicy::GetInstallerAttributes() const { … }
}