Chromium Code Reviews| 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/memory/ref_counted.h" | |
| 14 #include "base/values.h" | 15 #include "base/values.h" |
| 15 #include "components/component_updater/default_component_installer.h" | 16 #include "components/component_updater/default_component_installer.h" |
| 16 | 17 |
| 18 namespace net { | |
| 19 class SSLConfigService; | |
| 20 } // namespace net | |
| 21 | |
| 17 namespace component_updater { | 22 namespace component_updater { |
| 18 | 23 |
| 19 class ComponentUpdateService; | 24 class ComponentUpdateService; |
| 20 | 25 |
| 21 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits { | 26 class EVWhitelistComponentInstallerTraits : public ComponentInstallerTraits { |
| 22 public: | 27 public: |
| 23 EVWhitelistComponentInstallerTraits(); | 28 EVWhitelistComponentInstallerTraits( |
|
Sorin Jianu
2014/10/01 18:50:02
needs an explicit declarator.
Eran Messeri
2014/10/03 12:00:11
Not anymore since I've reverted to the default c't
| |
| 24 virtual ~EVWhitelistComponentInstallerTraits() {} | 29 net::SSLConfigService* ssl_config_service); |
| 30 virtual ~EVWhitelistComponentInstallerTraits(); | |
| 25 | 31 |
| 26 private: | 32 private: |
| 27 // The following methods override ComponentInstallerTraits. | 33 // The following methods override ComponentInstallerTraits. |
| 28 virtual bool CanAutoUpdate() const OVERRIDE; | 34 virtual bool CanAutoUpdate() const OVERRIDE; |
| 29 virtual bool OnCustomInstall(const base::DictionaryValue& manifest, | 35 virtual bool OnCustomInstall(const base::DictionaryValue& manifest, |
| 30 const base::FilePath& install_dir) OVERRIDE; | 36 const base::FilePath& install_dir) OVERRIDE; |
| 31 virtual bool VerifyInstallation( | 37 virtual bool VerifyInstallation( |
| 32 const base::FilePath& install_dir) const OVERRIDE; | 38 const base::FilePath& install_dir) const OVERRIDE; |
| 33 virtual void ComponentReady( | 39 virtual void ComponentReady( |
| 34 const base::Version& version, | 40 const base::Version& version, |
| 35 const base::FilePath& path, | 41 const base::FilePath& path, |
| 36 scoped_ptr<base::DictionaryValue> manifest) OVERRIDE; | 42 scoped_ptr<base::DictionaryValue> manifest) OVERRIDE; |
| 37 virtual base::FilePath GetBaseDirectory() const OVERRIDE; | 43 virtual base::FilePath GetBaseDirectory() const OVERRIDE; |
| 38 virtual void GetHash(std::vector<uint8_t>* hash) const OVERRIDE; | 44 virtual void GetHash(std::vector<uint8_t>* hash) const OVERRIDE; |
| 39 virtual std::string GetName() const OVERRIDE; | 45 virtual std::string GetName() const OVERRIDE; |
| 40 | 46 |
| 41 static base::FilePath GetInstalledPath(const base::FilePath& base); | 47 static base::FilePath GetInstalledPath(const base::FilePath& base); |
| 42 | 48 |
| 49 scoped_refptr<net::SSLConfigService> ssl_config_service_; | |
| 50 | |
| 43 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits); | 51 DISALLOW_COPY_AND_ASSIGN(EVWhitelistComponentInstallerTraits); |
| 44 }; | 52 }; |
| 45 | 53 |
| 46 // Call once during startup to make the component update service aware of | 54 // Call once during startup to make the component update service aware of |
| 47 // the EV whitelist. | 55 // the EV whitelist. |
| 48 void RegisterEVWhitelistComponent(ComponentUpdateService* cus); | 56 void RegisterEVWhitelistComponent(ComponentUpdateService* cus, |
| 57 net::SSLConfigService* ssl_config_service); | |
| 49 | 58 |
| 50 } // namespace component_updater | 59 } // namespace component_updater |
| 51 | 60 |
| 52 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ | 61 #endif // CHROME_BROWSER_COMPONENT_UPDATER_EV_WHITELIST_COMPONENT_INSTALLER_H_ |
| OLD | NEW |