| 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> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 class ComponentUpdateService; | 23 class ComponentUpdateService; |
| 24 | 24 |
| 25 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits { | 25 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits { |
| 26 public: | 26 public: |
| 27 EVWhitelistComponentInstallerTraits() {} | 27 EVWhitelistComponentInstallerTraits() {} |
| 28 ~EVWhitelistComponentInstallerTraits() override {} | 28 ~EVWhitelistComponentInstallerTraits() override {} |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 // The following methods override ComponentInstallerTraits. | 31 // The following methods override ComponentInstallerTraits. |
| 32 bool CanAutoUpdate() const override; | 32 bool CanAutoUpdate() const override; |
| 33 bool RequiresNetworkEncryption() const override; |
| 33 bool OnCustomInstall(const base::DictionaryValue& manifest, | 34 bool OnCustomInstall(const base::DictionaryValue& manifest, |
| 34 const base::FilePath& install_dir) override; | 35 const base::FilePath& install_dir) override; |
| 35 bool VerifyInstallation(const base::DictionaryValue& manifest, | 36 bool VerifyInstallation(const base::DictionaryValue& manifest, |
| 36 const base::FilePath& install_dir) const override; | 37 const base::FilePath& install_dir) const override; |
| 37 void ComponentReady(const base::Version& version, | 38 void ComponentReady(const base::Version& version, |
| 38 const base::FilePath& install_dir, | 39 const base::FilePath& install_dir, |
| 39 scoped_ptr<base::DictionaryValue> manifest) override; | 40 scoped_ptr<base::DictionaryValue> manifest) override; |
| 40 base::FilePath GetBaseDirectory() const override; | 41 base::FilePath GetBaseDirectory() const override; |
| 41 void GetHash(std::vector<uint8_t>* hash) const override; | 42 void GetHash(std::vector<uint8_t>* hash) const override; |
| 42 std::string GetName() const override; | 43 std::string GetName() const override; |
| 43 | 44 |
| 44 static base::FilePath GetInstalledPath(const base::FilePath& base); | 45 static base::FilePath GetInstalledPath(const base::FilePath& base); |
| 45 | 46 |
| 46 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits); | 47 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits); |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 // Call once during startup to make the component update service aware of | 50 // Call once during startup to make the component update service aware of |
| 50 // the EV whitelist. | 51 // the EV whitelist. |
| 51 void RegisterEVWhitelistComponent(ComponentUpdateService* cus, | 52 void RegisterEVWhitelistComponent(ComponentUpdateService* cus, |
| 52 const base::FilePath& user_data_dir); | 53 const base::FilePath& user_data_dir); |
| 53 | 54 |
| 54 } // namespace component_updater | 55 } // namespace component_updater |
| 55 | 56 |
| 56 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ | 57 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ |
| OLD | NEW |