| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COMPONENT_UPDATER_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ |
| 6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ | 6 #define CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // registered component, soon. If an update or check is already in progress, | 146 // registered component, soon. If an update or check is already in progress, |
| 147 // returns |kInProgress|. The same component cannot be checked repeatedly | 147 // returns |kInProgress|. The same component cannot be checked repeatedly |
| 148 // in a short interval either (returns |kError| if so). | 148 // in a short interval either (returns |kError| if so). |
| 149 // There is no guarantee that the item will actually be updated, | 149 // There is no guarantee that the item will actually be updated, |
| 150 // since another item may be chosen to be updated. Since there is | 150 // since another item may be chosen to be updated. Since there is |
| 151 // no time guarantee, there is no notification if the item is not updated. | 151 // no time guarantee, there is no notification if the item is not updated. |
| 152 // However, the ComponentInstaller should know if an update succeeded | 152 // However, the ComponentInstaller should know if an update succeeded |
| 153 // via the Install() hook. | 153 // via the Install() hook. |
| 154 virtual Status CheckForUpdateSoon(const CrxComponent& component) = 0; | 154 virtual Status CheckForUpdateSoon(const CrxComponent& component) = 0; |
| 155 | 155 |
| 156 virtual bool FindRegisteredComponent(const std::vector<uint8>& pk_hash, |
| 157 CrxComponent* component) = 0; |
| 158 |
| 159 |
| 156 virtual ~ComponentUpdateService() {} | 160 virtual ~ComponentUpdateService() {} |
| 157 }; | 161 }; |
| 158 | 162 |
| 159 // Creates the component updater. You must pass a valid |config| allocated on | 163 // Creates the component updater. You must pass a valid |config| allocated on |
| 160 // the heap which the component updater will own. | 164 // the heap which the component updater will own. |
| 161 ComponentUpdateService* ComponentUpdateServiceFactory( | 165 ComponentUpdateService* ComponentUpdateServiceFactory( |
| 162 ComponentUpdateService::Configurator* config); | 166 ComponentUpdateService::Configurator* config); |
| 163 | 167 |
| 164 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ | 168 #endif // CHROME_BROWSER_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ |
| OLD | NEW |