1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_
6 #define CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_
12 #include "base/files/file_path.h"
13 #include "base/macros.h"
14 #include "base/values.h"
15 #include "components/component_updater/default_component_installer.h"
17 namespace component_updater {
19 class ComponentUpdateService;
21 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits {
23 EVWhitelistComponentInstallerTraits();
24 virtual ~EVWhitelistComponentInstallerTraits() {}
27 // The following methods override ComponentInstallerTraits.
28 virtual bool CanAutoUpdate() const OVERRIDE;
29 virtual bool OnCustomInstall(const base::DictionaryValue& manifest,
30 const base::FilePath& install_dir) OVERRIDE;
31 virtual bool VerifyInstallation(
32 const base::FilePath& install_dir) const OVERRIDE;
33 virtual void ComponentReady(
34 const base::Version& version,
35 const base::FilePath& path,
36 scoped_ptr<base::DictionaryValue> manifest) OVERRIDE;
37 virtual base::FilePath GetBaseDirectory() const OVERRIDE;
38 virtual void GetHash(std::vector<uint8_t>* hash) const OVERRIDE;
39 virtual std::string GetName() const OVERRIDE;
41 static base::FilePath GetInstalledPath(const base::FilePath& base);
43 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits);
46 // Call once during startup to make the component update service aware of
48 void RegisterEVWhitelistComponent(ComponentUpdateService* cus);
50 } // namespace component_updater
52 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_