chromium/components/component_updater/installer_policies/masked_domain_list_component_installer_policy.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#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;

// The SHA256 of the SubjectPublicKeyInfo used to sign the extension.
// The extension id is: cffplpkejcbdpfnfabnjikeicbedmifn
constexpr uint8_t kMaskedDomainListPublicKeySHA256[32] =;

constexpr char kMaskedDomainListManifestName[] =;

constexpr char kExperimentalVersionAttributeName[] =;

constexpr base::FilePath::CharType kMaskedDomainListRelativeInstallDir[] =);

constexpr char kMaskedDomainListProto[] =;

}  // namespace

namespace component_updater {

// Helper class to read file to named proto class for mojo wrapper.
class ReadMaskedDomainListProto {};

MaskedDomainListComponentInstallerPolicy::
    MaskedDomainListComponentInstallerPolicy(
        ListReadyRepeatingCallback on_list_ready)
    :{}

MaskedDomainListComponentInstallerPolicy::
    ~MaskedDomainListComponentInstallerPolicy() = default;

bool MaskedDomainListComponentInstallerPolicy::
    SupportsGroupPolicyEnabledComponentUpdates() const {}

// static
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) {}

// Called during startup and installation before ComponentReady().
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 {}

// static
void MaskedDomainListComponentInstallerPolicy::GetPublicKeyHash(
    std::vector<uint8_t>* hash) {}

std::string MaskedDomainListComponentInstallerPolicy::GetName() const {}

update_client::InstallerAttributes
MaskedDomainListComponentInstallerPolicy::GetInstallerAttributes() const {}

}  // namespace component_updater