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