OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ | |
6 #define CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ | |
7 | |
8 #include <stdint.h> | |
9 #include <memory> | |
10 #include <string> | |
11 #include <vector> | |
12 | |
13 #include "base/files/file_path.h" | |
14 #include "base/macros.h" | |
15 #include "base/values.h" | |
16 #include "components/component_updater/default_component_installer.h" | |
17 | |
18 namespace base { | |
19 class FilePath; | |
20 } // namespace base | |
21 | |
22 namespace component_updater { | |
23 | |
24 class ComponentUpdateService; | |
25 | |
26 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits { | |
27 public: | |
28 EVWhitelistComponentInstallerTraits() {} | |
29 ~EVWhitelistComponentInstallerTraits() override {} | |
30 | |
31 private: | |
32 // The following methods override ComponentInstallerTraits. | |
33 bool SupportsGroupPolicyEnabledComponentUpdates() const override; | |
34 bool RequiresNetworkEncryption() const override; | |
35 update_client::CrxInstaller::Result OnCustomInstall( | |
36 const base::DictionaryValue& manifest, | |
37 const base::FilePath& install_dir) override; | |
38 bool VerifyInstallation(const base::DictionaryValue& manifest, | |
39 const base::FilePath& install_dir) const override; | |
40 void ComponentReady(const base::Version& version, | |
41 const base::FilePath& install_dir, | |
42 std::unique_ptr<base::DictionaryValue> manifest) override; | |
43 base::FilePath GetRelativeInstallDir() const override; | |
44 void GetHash(std::vector<uint8_t>* hash) const override; | |
45 std::string GetName() const override; | |
46 update_client::InstallerAttributes GetInstallerAttributes() const override; | |
47 std::vector<std::string> GetMimeTypes() const override; | |
48 | |
49 static base::FilePath GetInstalledPath(const base::FilePath& base); | |
50 | |
51 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits); | |
52 }; | |
53 | |
54 // Call once during startup to make the component update service aware of | |
55 // the EV whitelist. | |
56 void RegisterEVWhitelistComponent(ComponentUpdateService* cus, | |
57 const base::FilePath& user_data_dir); | |
58 | |
59 } // namespace component_updater | |
60 | |
61 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ | |
OLD | NEW |