| 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 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 namespace component_updater { | 51 namespace component_updater { |
| 52 | 52 |
| 53 class OnDemandUpdater; | 53 class OnDemandUpdater; |
| 54 | 54 |
| 55 using Configurator = update_client::Configurator; | 55 using Configurator = update_client::Configurator; |
| 56 using CrxComponent = update_client::CrxComponent; | 56 using CrxComponent = update_client::CrxComponent; |
| 57 using CrxUpdateItem = update_client::CrxUpdateItem; | 57 using CrxUpdateItem = update_client::CrxUpdateItem; |
| 58 | 58 |
| 59 struct ComponentInfo { | 59 struct ComponentInfo { |
| 60 ComponentInfo(const std::string& id, const base::string16& name); | 60 ComponentInfo(const std::string& id, const base::string16& name, |
| 61 const base::Version& version); |
| 61 ~ComponentInfo(); | 62 ~ComponentInfo(); |
| 62 | 63 |
| 63 const std::string id; | 64 const std::string id; |
| 64 const base::string16 name; | 65 const base::string16 name; |
| 66 const base::Version version; |
| 65 }; | 67 }; |
| 66 | 68 |
| 67 // The component update service is in charge of installing or upgrading | 69 // The component update service is in charge of installing or upgrading |
| 68 // select parts of chrome. Each part is called a component and managed by | 70 // select parts of chrome. Each part is called a component and managed by |
| 69 // instances of CrxComponent registered using RegisterComponent(). On the | 71 // instances of CrxComponent registered using RegisterComponent(). On the |
| 70 // server, each component is packaged as a CRX which is the same format used | 72 // server, each component is packaged as a CRX which is the same format used |
| 71 // to package extensions. To the update service each component is identified | 73 // to package extensions. To the update service each component is identified |
| 72 // by its public key hash (CrxComponent::pk_hash). If there is an update | 74 // by its public key hash (CrxComponent::pk_hash). If there is an update |
| 73 // available and its version is bigger than (CrxComponent::version), it will | 75 // available and its version is bigger than (CrxComponent::version), it will |
| 74 // be downloaded, verified and unpacked. Then component-specific installer | 76 // be downloaded, verified and unpacked. Then component-specific installer |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 ComponentUpdateService::CompletionCallback callback) = 0; | 177 ComponentUpdateService::CompletionCallback callback) = 0; |
| 176 }; | 178 }; |
| 177 | 179 |
| 178 // Creates the component updater. | 180 // Creates the component updater. |
| 179 std::unique_ptr<ComponentUpdateService> ComponentUpdateServiceFactory( | 181 std::unique_ptr<ComponentUpdateService> ComponentUpdateServiceFactory( |
| 180 const scoped_refptr<Configurator>& config); | 182 const scoped_refptr<Configurator>& config); |
| 181 | 183 |
| 182 } // namespace component_updater | 184 } // namespace component_updater |
| 183 | 185 |
| 184 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ | 186 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_SERVICE_H_ |
| OLD | NEW |