chromium/components/component_updater/installer_policies/tpcd_metadata_component_installer_policy.cc

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

#include "components/component_updater/installer_policies/tpcd_metadata_component_installer_policy.h"

#include <optional>

#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/path_service.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/version.h"
#include "components/component_updater/component_updater_service.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/tpcd/metadata/browser/parser.h"
#include "net/base/features.h"

ComponentUpdateService;

namespace {
// This is similar to the display name at http://omaharelease/1915488/settings
// and
// http://google3/java/com/google/installer/releasemanager/Automation.java;l=1161;rcl=553816031
constexpr char kTpcdMetadataManifestName[] =;

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

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

// Runs on a thread pool.
std::optional<std::string> ReadComponentFromDisk(
    const base::FilePath& file_path) {}

base::FilePath GetComponentPath(const base::FilePath& install_dir) {}
}  // namespace

namespace component_updater {
TpcdMetadataComponentInstallerPolicy::TpcdMetadataComponentInstallerPolicy(
    OnTpcdMetadataComponentReadyCallback on_component_ready_callback)
    :{}

TpcdMetadataComponentInstallerPolicy::~TpcdMetadataComponentInstallerPolicy() =
    default;

// Start of ComponentInstallerPolicy overrides impl:
bool TpcdMetadataComponentInstallerPolicy::
    SupportsGroupPolicyEnabledComponentUpdates() const {}

bool TpcdMetadataComponentInstallerPolicy::RequiresNetworkEncryption() const {}

update_client::CrxInstaller::Result
TpcdMetadataComponentInstallerPolicy::OnCustomInstall(
    const base::Value::Dict& manifest,
    const base::FilePath& install_dir) {}

void TpcdMetadataComponentInstallerPolicy::OnCustomUninstall() {}

void TpcdMetadataComponentInstallerPolicy::ComponentReady(
    const base::Version& version,
    const base::FilePath& install_dir,
    base::Value::Dict manifest) {}

void WriteMetrics(tpcd::metadata::InstallationResult result) {}

// Called during startup and installation before ComponentReady().
bool TpcdMetadataComponentInstallerPolicy::VerifyInstallation(
    const base::Value::Dict& manifest,
    const base::FilePath& install_dir) const {}

base::FilePath TpcdMetadataComponentInstallerPolicy::GetRelativeInstallDir()
    const {}

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

void TpcdMetadataComponentInstallerPolicy::GetHash(
    std::vector<uint8_t>* hash) const {}

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

update_client::InstallerAttributes
TpcdMetadataComponentInstallerPolicy::GetInstallerAttributes() const {}
// End of ComponentInstallerPolicy overrides impl.

}  // namespace component_updater