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_COMPONENT_UPDATER_SERVICE_H_ | 5 #ifndef COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ |
6 #define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ | 6 #define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 // Stop doing update checks. In-flight requests and pending installations | 118 // Stop doing update checks. In-flight requests and pending installations |
119 // will not be canceled. | 119 // will not be canceled. |
120 virtual Status Stop() = 0; | 120 virtual Status Stop() = 0; |
121 | 121 |
122 // Add component to be checked for updates. You can call this method | 122 // Add component to be checked for updates. You can call this method |
123 // before calling Start(). | 123 // before calling Start(). |
124 virtual Status RegisterComponent( | 124 virtual Status RegisterComponent( |
125 const update_client::CrxComponent& component) = 0; | 125 const update_client::CrxComponent& component) = 0; |
126 | 126 |
| 127 // Unregisters the component with the given ID. This means that the component |
| 128 // is not going to be included in future update checks. If a download or |
| 129 // update operation for the component is currently in progress, it will |
| 130 // silently finish without triggering the next step. |
| 131 // Note that the installer for the component is responsible for removing any |
| 132 // existing versions of the component from disk. |
| 133 virtual Status UnregisterComponent(const std::string& crx_id) = 0; |
| 134 |
127 // Returns a list of registered components. | 135 // Returns a list of registered components. |
128 virtual std::vector<std::string> GetComponentIDs() const = 0; | 136 virtual std::vector<std::string> GetComponentIDs() const = 0; |
129 | 137 |
130 // Returns an interface for on-demand updates. On-demand updates are | 138 // Returns an interface for on-demand updates. On-demand updates are |
131 // proactively triggered outside the normal component update service schedule. | 139 // proactively triggered outside the normal component update service schedule. |
132 virtual OnDemandUpdater& GetOnDemandUpdater() = 0; | 140 virtual OnDemandUpdater& GetOnDemandUpdater() = 0; |
133 | 141 |
134 // This method is used to trigger an on-demand update for component |crx_id|. | 142 // This method is used to trigger an on-demand update for component |crx_id|. |
135 // This can be used when loading a resource that depends on this component. | 143 // This can be used when loading a resource that depends on this component. |
136 // | 144 // |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 }; | 191 }; |
184 | 192 |
185 // Creates the component updater. You must pass a valid |config| allocated on | 193 // Creates the component updater. You must pass a valid |config| allocated on |
186 // the heap which the component updater will own. | 194 // the heap which the component updater will own. |
187 ComponentUpdateService* ComponentUpdateServiceFactory( | 195 ComponentUpdateService* ComponentUpdateServiceFactory( |
188 update_client::Configurator* config); | 196 update_client::Configurator* config); |
189 | 197 |
190 } // namespace component_updater | 198 } // namespace component_updater |
191 | 199 |
192 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ | 200 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ |
OLD | NEW |