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 <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/files/file_path.h" |
| 12 #include "base/values.h" |
| 13 #include "chrome/browser/component_updater/default_component_installer.h" |
| 14 |
| 15 namespace component_updater { |
| 16 |
| 17 class ComponentUpdateService; |
| 18 |
| 19 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits { |
| 20 public: |
| 21 EVWhitelistComponentInstallerTraits(); |
| 22 virtual ~EVWhitelistComponentInstallerTraits() {} |
| 23 |
| 24 private: |
| 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; |
| 38 |
| 39 static base::FilePath GetInstalledPath(const base::FilePath& base); |
| 40 |
| 41 std::string compressed_whitelist_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits); |
| 44 }; |
| 45 |
| 46 // Call once during startup to make the component update service aware of |
| 47 // the EV whitelist. |
| 48 void RegisterEVWhitelistComponent(ComponentUpdateService* cus); |
| 49 |
| 50 } // namespace component_updater |
| 51 |
| 52 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ |
OLD | NEW |