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 COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ | 5 #ifndef COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
| 6 #define COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ | 6 #define COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 79 // Returns a relative path that will be appended to the component updater | 79 // Returns a relative path that will be appended to the component updater |
| 80 // root directories to find the data for this particular component. | 80 // root directories to find the data for this particular component. |
| 81 virtual base::FilePath GetRelativeInstallDir() const = 0; | 81 virtual base::FilePath GetRelativeInstallDir() const = 0; |
| 82 | 82 |
| 83 // Returns the component's SHA2 hash as raw bytes. | 83 // Returns the component's SHA2 hash as raw bytes. |
| 84 virtual void GetHash(std::vector<uint8_t>* hash) const = 0; | 84 virtual void GetHash(std::vector<uint8_t>* hash) const = 0; |
| 85 | 85 |
| 86 // Returns the human-readable name of the component. | 86 // Returns the human-readable name of the component. |
| 87 virtual std::string GetName() const = 0; | 87 virtual std::string GetName() const = 0; |
| 88 | 88 |
| 89 // If this component is a plugin, returns the media types it can handle as a | |
|
Sorin Jianu
2016/07/28 23:29:39
nit.
Can erase " as a vector. Else, does nothing"
waffles
2016/07/28 23:42:44
Done.
| |
| 90 // vector. Else, does nothing. | |
| 91 virtual std::vector<std::string> GetMimeTypes() const = 0; | |
| 92 | |
| 89 // Returns a container of name-value pairs representing arbitrary, | 93 // Returns a container of name-value pairs representing arbitrary, |
| 90 // installer-defined metadata. | 94 // installer-defined metadata. |
| 91 // The installer metadata may be used in the update checks for this component. | 95 // The installer metadata may be used in the update checks for this component. |
| 92 // A compatible server may use these attributes to negotiate special update | 96 // A compatible server may use these attributes to negotiate special update |
| 93 // rules when issuing an update response. | 97 // rules when issuing an update response. |
| 94 // Valid values for the name part of an attribute match | 98 // Valid values for the name part of an attribute match |
| 95 // ^[-_a-zA-Z0-9]{1,256}$ and valid values the value part of an attribute | 99 // ^[-_a-zA-Z0-9]{1,256}$ and valid values the value part of an attribute |
| 96 // match ^[-.,;+_=a-zA-Z0-9]{0,256}$ . | 100 // match ^[-.,;+_=a-zA-Z0-9]{0,256}$ . |
| 97 virtual update_client::InstallerAttributes GetInstallerAttributes() const = 0; | 101 virtual update_client::InstallerAttributes GetInstallerAttributes() const = 0; |
| 98 }; | 102 }; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 152 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 149 | 153 |
| 150 base::ThreadChecker thread_checker_; | 154 base::ThreadChecker thread_checker_; |
| 151 | 155 |
| 152 DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller); | 156 DISALLOW_COPY_AND_ASSIGN(DefaultComponentInstaller); |
| 153 }; | 157 }; |
| 154 | 158 |
| 155 } // namespace component_updater | 159 } // namespace component_updater |
| 156 | 160 |
| 157 #endif // COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ | 161 #endif // COMPONENTS_COMPONENT_UPDATER_DEFAULT_COMPONENT_INSTALLER_H_ |
| OLD | NEW |