1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- // Copyright 2019 The Chromium Authors. All rights reserved.
- // 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 "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& manifest,
- const base::FilePath& install_dir) override;
- void OnCustomUninstall() override;
- bool VerifyInstallation(const base::Value& manifest,
- const base::FilePath& install_dir) const override;
- void ComponentReady(const base::Version& version,
- const base::FilePath& install_dir,
- base::Value 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_
|