#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/component_updater/installer_policies/safety_tips_component_installer.h"
#include <memory>
#include <utility>
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/task/thread_pool.h"
#include "base/values.h"
#include "components/lookalikes/core/safety_tips.pb.h"
#include "components/lookalikes/core/safety_tips_config.h"
ComponentUpdateService;
namespace {
const base::FilePath::CharType kSafetyTipsConfigBinaryPbFileName[] = …);
const uint8_t kSafetyTipsPublicKeySHA256[32] = …;
std::unique_ptr<reputation::SafetyTipsConfig> LoadSafetyTipsProtoFromDisk(
const base::FilePath& pb_path) { … }
}
namespace component_updater {
SafetyTipsComponentInstallerPolicy::SafetyTipsComponentInstallerPolicy() =
default;
SafetyTipsComponentInstallerPolicy::~SafetyTipsComponentInstallerPolicy() =
default;
bool SafetyTipsComponentInstallerPolicy::
SupportsGroupPolicyEnabledComponentUpdates() const { … }
bool SafetyTipsComponentInstallerPolicy::RequiresNetworkEncryption() const { … }
update_client::CrxInstaller::Result
SafetyTipsComponentInstallerPolicy::OnCustomInstall(
const base::Value::Dict& ,
const base::FilePath& ) { … }
void SafetyTipsComponentInstallerPolicy::OnCustomUninstall() { … }
base::FilePath SafetyTipsComponentInstallerPolicy::GetInstalledPath(
const base::FilePath& base) { … }
void SafetyTipsComponentInstallerPolicy::ComponentReady(
const base::Version& version,
const base::FilePath& install_dir,
base::Value::Dict ) { … }
bool SafetyTipsComponentInstallerPolicy::VerifyInstallation(
const base::Value::Dict& ,
const base::FilePath& install_dir) const { … }
base::FilePath SafetyTipsComponentInstallerPolicy::GetRelativeInstallDir()
const { … }
void SafetyTipsComponentInstallerPolicy::GetHash(
std::vector<uint8_t>* hash) const { … }
std::string SafetyTipsComponentInstallerPolicy::GetName() const { … }
update_client::InstallerAttributes
SafetyTipsComponentInstallerPolicy::GetInstallerAttributes() const { … }
void RegisterSafetyTipsComponent(ComponentUpdateService* cus) { … }
}