blob: 677d474ef19aa5b041219b4b598b1cb72bb6bae7 [file] [log] [blame]
// 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.
#ifndef COMPONENTS_COMPONENT_UPDATER_INSTALLER_POLICIES_SAFETY_TIPS_COMPONENT_INSTALLER_H_
#define COMPONENTS_COMPONENT_UPDATER_INSTALLER_POLICIES_SAFETY_TIPS_COMPONENT_INSTALLER_H_
#include <memory>
#include <string>
#include <vector>
#include "base/values.h"
#include "components/component_updater/component_installer.h"
namespace base {
class FilePath;
} // namespace base
namespace component_updater {
class SafetyTipsComponentInstallerPolicy : public ComponentInstallerPolicy {
public:
SafetyTipsComponentInstallerPolicy();
SafetyTipsComponentInstallerPolicy(
const SafetyTipsComponentInstallerPolicy&) = delete;
SafetyTipsComponentInstallerPolicy& operator=(
const SafetyTipsComponentInstallerPolicy&) = delete;
~SafetyTipsComponentInstallerPolicy() override;
private:
// ComponentInstallerPolicy methods:
bool SupportsGroupPolicyEnabledComponentUpdates() const override;
bool RequiresNetworkEncryption() const override;
update_client::CrxInstaller::Result OnCustomInstall(
const base::Value::Dict& manifest,
const base::FilePath& install_dir) override;
void OnCustomUninstall() override;
bool VerifyInstallation(const base::Value::Dict& manifest,
const base::FilePath& install_dir) const override;
void ComponentReady(const base::Version& version,
const base::FilePath& install_dir,
base::Value::Dict manifest) override;
base::FilePath GetRelativeInstallDir() const override;
void GetHash(std::vector<uint8_t>* hash) const override;
std::string GetName() const override;
update_client::InstallerAttributes GetInstallerAttributes() const override;
static base::FilePath GetInstalledPath(const base::FilePath& base);
};
void RegisterSafetyTipsComponent(ComponentUpdateService* cus);
} // namespace component_updater
#endif // COMPONENTS_COMPONENT_UPDATER_INSTALLER_POLICIES_SAFETY_TIPS_COMPONENT_INSTALLER_H_