| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_ORIGIN_TRIALS_COMPONENT_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_ORIGIN_TRIALS_COMPONENT_INSTALLER_H_ |
| 6 #define CHROME_BROWSER_COMPONENT_UPDATER_ORIGIN_TRIALS_COMPONENT_INSTALLER_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_ORIGIN_TRIALS_COMPONENT_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class OriginTrialsComponentInstallerTraits : public ComponentInstallerTraits { | 24 class OriginTrialsComponentInstallerTraits : public ComponentInstallerTraits { |
| 25 public: | 25 public: |
| 26 OriginTrialsComponentInstallerTraits() = default; | 26 OriginTrialsComponentInstallerTraits() = default; |
| 27 ~OriginTrialsComponentInstallerTraits() override = default; | 27 ~OriginTrialsComponentInstallerTraits() override = default; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 bool VerifyInstallation(const base::DictionaryValue& manifest, | 30 bool VerifyInstallation(const base::DictionaryValue& manifest, |
| 31 const base::FilePath& install_dir) const override; | 31 const base::FilePath& install_dir) const override; |
| 32 bool SupportsGroupPolicyEnabledComponentUpdates() const override; | 32 bool SupportsGroupPolicyEnabledComponentUpdates() const override; |
| 33 bool RequiresNetworkEncryption() const override; | 33 bool RequiresNetworkEncryption() const override; |
| 34 bool OnCustomInstall(const base::DictionaryValue& manifest, | 34 update_client::CrxInstaller::Result OnCustomInstall( |
| 35 const base::FilePath& install_dir) override; | 35 const base::DictionaryValue& manifest, |
| 36 const base::FilePath& install_dir) override; |
| 36 void ComponentReady(const base::Version& version, | 37 void ComponentReady(const base::Version& version, |
| 37 const base::FilePath& install_dir, | 38 const base::FilePath& install_dir, |
| 38 std::unique_ptr<base::DictionaryValue> manifest) override; | 39 std::unique_ptr<base::DictionaryValue> manifest) override; |
| 39 base::FilePath GetRelativeInstallDir() const override; | 40 base::FilePath GetRelativeInstallDir() const override; |
| 40 void GetHash(std::vector<uint8_t>* hash) const override; | 41 void GetHash(std::vector<uint8_t>* hash) const override; |
| 41 std::string GetName() const override; | 42 std::string GetName() const override; |
| 42 update_client::InstallerAttributes GetInstallerAttributes() const override; | 43 update_client::InstallerAttributes GetInstallerAttributes() const override; |
| 43 std::vector<std::string> GetMimeTypes() const override; | 44 std::vector<std::string> GetMimeTypes() const override; |
| 44 | 45 |
| 45 DISALLOW_COPY_AND_ASSIGN(OriginTrialsComponentInstallerTraits); | 46 DISALLOW_COPY_AND_ASSIGN(OriginTrialsComponentInstallerTraits); |
| 46 }; | 47 }; |
| 47 | 48 |
| 48 // Call once during startup to make the component update service aware of | 49 // Call once during startup to make the component update service aware of |
| 49 // the origin trials update component. | 50 // the origin trials update component. |
| 50 void RegisterOriginTrialsComponent(ComponentUpdateService* cus, | 51 void RegisterOriginTrialsComponent(ComponentUpdateService* cus, |
| 51 const base::FilePath& user_data_dir); | 52 const base::FilePath& user_data_dir); |
| 52 | 53 |
| 53 } // namespace component_updater | 54 } // namespace component_updater |
| 54 | 55 |
| 55 #endif // CHROME_BROWSER_COMPONENT_UPDATER_ORIGIN_TRIALS_COMPONENT_INSTALLER_H_ | 56 #endif // CHROME_BROWSER_COMPONENT_UPDATER_ORIGIN_TRIALS_COMPONENT_INSTALLER_H_ |
| OLD | NEW |