Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / component_updater / ev_whitelist_component_installer.h
blob0f417b743b266e8030344e8cf0b6dbb8dd263a9c
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_
8 #include <stdint.h>
9 #include <string>
10 #include <vector>
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 base {
18 class FilePath;
19 } // namespace base
21 namespace component_updater {
23 class ComponentUpdateService;
25 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits {
26 public:
27 explicit EVWhitelistComponentInstallerTraits(const base::FilePath& base_path);
28 ~EVWhitelistComponentInstallerTraits() override {}
30 private:
31 // The following methods override ComponentInstallerTraits.
32 bool CanAutoUpdate() const override;
33 bool OnCustomInstall(const base::DictionaryValue& manifest,
34 const base::FilePath& install_dir) override;
35 bool VerifyInstallation(const base::DictionaryValue& manifest,
36 const base::FilePath& install_dir) const override;
37 void ComponentReady(const base::Version& version,
38 const base::FilePath& path,
39 scoped_ptr<base::DictionaryValue> manifest) override;
40 base::FilePath GetBaseDirectory() const override;
41 void GetHash(std::vector<uint8_t>* hash) const override;
42 std::string GetName() const override;
44 static base::FilePath GetInstalledPath(const base::FilePath& base);
46 const base::FilePath ev_whitelist_path_;
48 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits);
51 // Call once during startup to make the component update service aware of
52 // the EV whitelist.
53 void RegisterEVWhitelistComponent(ComponentUpdateService* cus,
54 const base::FilePath& path);
56 } // namespace component_updater
58 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_