chromium/chrome/browser/component_updater/crl_set_component_installer.cc

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

#include "chrome/browser/component_updater/crl_set_component_installer.h"

#include <memory>
#include <string>
#include <vector>

#include "base/containers/span.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/lazy_instance.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/task/thread_pool.h"
#include "base/threading/scoped_blocking_call.h"
#include "components/component_updater/component_installer.h"
#include "components/component_updater/component_updater_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/network_service_instance.h"
#include "net/cert/crl_set.h"
#include "net/ssl/ssl_config_service.h"
#include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom.h"

namespace component_updater {

namespace {

// kCrlSetPublicKeySHA256 is the SHA256 hash of the SubjectPublicKeyInfo of the
// key that's used to sign generated CRL sets.
const uint8_t kCrlSetPublicKeySHA256[32] =;

const base::FilePath::CharType kCRLSetFile[] =);

// Returns the contents of the file at |crl_path|.
std::string LoadCRLSet(const base::FilePath& crl_path) {}

// Singleton object used to configure Network Services and memoize the CRLSet
// configuration.
//
// TODO(crbug.com/40693524): if CertVerifierServiceFactory is moved out
// of the browser process, this will need to be updated to handle
// CertVerifierServiceFactory disconnections/restarts, so that a newly
// restarted CertVerifierServiceFactory can be reinitialized with the current
// CRLSet component data. (There used to be code to handle network service
// restarts here, so you could look in the revision history for that as a
// hint.)
class CRLSetData {};

base::LazyInstance<CRLSetData>::Leaky g_crl_set_data =;

void CRLSetData::ConfigureCertVerifierServiceFactory() {}

void CRLSetData::UpdateCRLSetOnUI(const std::string& crl_set_bytes) {}

}  // namespace

CRLSetPolicy::CRLSetPolicy() = default;
CRLSetPolicy::~CRLSetPolicy() = default;

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

bool CRLSetPolicy::SupportsGroupPolicyEnabledComponentUpdates() const {}

bool CRLSetPolicy::RequiresNetworkEncryption() const {}

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

void CRLSetPolicy::OnCustomUninstall() {}

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

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

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

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

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

void RegisterCRLSetComponent(ComponentUpdateService* cus) {}

}  // namespace component_updater