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_
11 #include "base/files/file_path.h"
12 #include "base/values.h"
13 #include "components/component_updater/default_component_installer.h"
15 namespace component_updater
{
17 class ComponentUpdateService
;
19 class EVWhitelistComponentInstallerTraits
: public ComponentInstallerTraits
{
21 EVWhitelistComponentInstallerTraits();
22 virtual ~EVWhitelistComponentInstallerTraits() {}
25 // The following methods override ComponentInstallerTraits.
26 virtual bool CanAutoUpdate() const OVERRIDE
;
27 virtual bool OnCustomInstall(const base::DictionaryValue
& manifest
,
28 const base::FilePath
& install_dir
) OVERRIDE
;
29 virtual bool VerifyInstallation(
30 const base::FilePath
& install_dir
) const OVERRIDE
;
31 virtual void ComponentReady(
32 const base::Version
& version
,
33 const base::FilePath
& path
,
34 scoped_ptr
<base::DictionaryValue
> manifest
) OVERRIDE
;
35 virtual base::FilePath
GetBaseDirectory() const OVERRIDE
;
36 virtual void GetHash(std::vector
<uint8
>* hash
) const OVERRIDE
;
37 virtual std::string
GetName() const OVERRIDE
;
39 static base::FilePath
GetInstalledPath(const base::FilePath
& base
);
41 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits
);
44 // Call once during startup to make the component update service aware of
46 void RegisterEVWhitelistComponent(ComponentUpdateService
* cus
);
48 } // namespace component_updater
50 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_