chromium/chrome/browser/component_updater/crowd_deny_component_installer.cc

// Copyright 2019 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 "chrome/browser/component_updater/crowd_deny_component_installer.h"

#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>

#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/values.h"
#include "chrome/browser/permissions/crowd_deny_preload_data.h"
#include "components/permissions/permission_uma_util.h"

namespace {

// The SHA-256 hash of the public key (in X.509 format, DER-encoded) used to
// sign the extension. The extension id is: ggkkehgbnfjpeggfpleeakpidbkibbmn.
constexpr uint8_t kCrowdDenyPublicKeySHA256[32] =;

constexpr char kCrowdDenyHumanReadableName[] =;
constexpr char kCrowdDenyManifestPreloadDataFormatKey[] =;
constexpr int kCrowdDenyManifestPreloadDataCurrentFormat =;

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

base::FilePath GetPreloadDataFilePath(const base::FilePath& install_dir) {}

}  // namespace

namespace component_updater {

bool CrowdDenyComponentInstallerPolicy::
    SupportsGroupPolicyEnabledComponentUpdates() const {}

bool CrowdDenyComponentInstallerPolicy::VerifyInstallation(
    const base::Value::Dict& manifest,
    const base::FilePath& install_dir) const {}

bool CrowdDenyComponentInstallerPolicy::RequiresNetworkEncryption() const {}

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

void CrowdDenyComponentInstallerPolicy::OnCustomUninstall() {}

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

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

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

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

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

void RegisterCrowdDenyComponent(ComponentUpdateService* cus) {}

}  // namespace component_updater