#include "chrome/browser/component_updater/privacy_sandbox_attestations_component_installer.h"
#include <cstdint>
#include <memory>
#include <utility>
#include <vector>
#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "base/path_service.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/time/time.h"
#include "base/values.h"
#include "base/version.h"
#include "chrome/common/chrome_paths.h"
#include "components/component_updater/component_installer.h"
#include "components/privacy_sandbox/privacy_sandbox_attestations/privacy_sandbox_attestations.h"
#include "components/privacy_sandbox/privacy_sandbox_features.h"
#include "components/startup_metric_utils/browser/startup_metric_utils.h"
#include "components/update_client/update_client.h"
namespace {
constexpr base::FilePath::CharType kPrivacySandboxAttestationsFileName[] = …);
constexpr base::FilePath::CharType
kPrivacySandboxAttestationsRelativeInstallDir[] = …);
constexpr uint8_t kPrivacySandboxAttestationsPublicKeySHA256[32] = …;
const char kPrivacySandboxAttestationsManifestName[] = …;
}
namespace component_updater {
PrivacySandboxAttestationsComponentInstallerPolicy::
PrivacySandboxAttestationsComponentInstallerPolicy(
AttestationsReadyRepeatingCallback on_attestations_ready)
: … { … }
PrivacySandboxAttestationsComponentInstallerPolicy::
~PrivacySandboxAttestationsComponentInstallerPolicy() = default;
bool PrivacySandboxAttestationsComponentInstallerPolicy::VerifyInstallation(
const base::Value::Dict& manifest,
const base::FilePath& install_dir) const { … }
bool PrivacySandboxAttestationsComponentInstallerPolicy::
SupportsGroupPolicyEnabledComponentUpdates() const { … }
bool PrivacySandboxAttestationsComponentInstallerPolicy::
RequiresNetworkEncryption() const { … }
update_client::CrxInstaller::Result
PrivacySandboxAttestationsComponentInstallerPolicy::OnCustomInstall(
const base::Value::Dict& manifest,
const base::FilePath& install_dir) { … }
void PrivacySandboxAttestationsComponentInstallerPolicy::OnCustomUninstall() { … }
void PrivacySandboxAttestationsComponentInstallerPolicy::ComponentReady(
const base::Version& version,
const base::FilePath& install_dir,
base::Value::Dict manifest) { … }
base::FilePath
PrivacySandboxAttestationsComponentInstallerPolicy::GetRelativeInstallDir()
const { … }
void PrivacySandboxAttestationsComponentInstallerPolicy::GetHash(
std::vector<uint8_t>* hash) const { … }
std::string PrivacySandboxAttestationsComponentInstallerPolicy::GetName()
const { … }
update_client::InstallerAttributes
PrivacySandboxAttestationsComponentInstallerPolicy::GetInstallerAttributes()
const { … }
void PrivacySandboxAttestationsComponentInstallerPolicy::
ComponentReadyForTesting(const base::Version& version,
const base::FilePath& install_dir,
base::Value::Dict manifest) { … }
base::FilePath
PrivacySandboxAttestationsComponentInstallerPolicy::GetInstalledFilePath(
const base::FilePath& base) { … }
base::FilePath
PrivacySandboxAttestationsComponentInstallerPolicy::GetInstalledDirectory(
const base::FilePath& base) { … }
void RegisterPrivacySandboxAttestationsComponent(ComponentUpdateService* cus) { … }
}