OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_UPDATE_CLIENT_UPDATE_CLIENT_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_H_ |
6 #define COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 175 |
176 protected: | 176 protected: |
177 friend class base::RefCountedThreadSafe<CrxInstaller>; | 177 friend class base::RefCountedThreadSafe<CrxInstaller>; |
178 | 178 |
179 virtual ~CrxInstaller() {} | 179 virtual ~CrxInstaller() {} |
180 }; | 180 }; |
181 | 181 |
182 // TODO(sorin): this structure will be refactored soon. | 182 // TODO(sorin): this structure will be refactored soon. |
183 struct CrxComponent { | 183 struct CrxComponent { |
184 CrxComponent(); | 184 CrxComponent(); |
| 185 CrxComponent(const CrxComponent& other); |
185 ~CrxComponent(); | 186 ~CrxComponent(); |
186 | 187 |
187 // SHA256 hash of the CRX's public key. | 188 // SHA256 hash of the CRX's public key. |
188 std::vector<uint8_t> pk_hash; | 189 std::vector<uint8_t> pk_hash; |
189 scoped_refptr<CrxInstaller> installer; | 190 scoped_refptr<CrxInstaller> installer; |
190 | 191 |
191 // The current version if the CRX is updated. Otherwise, "0" or "0.0" if | 192 // The current version if the CRX is updated. Otherwise, "0" or "0.0" if |
192 // the CRX is installed. | 193 // the CRX is installed. |
193 Version version; | 194 Version version; |
194 | 195 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 virtual ~UpdateClient() {} | 320 virtual ~UpdateClient() {} |
320 }; | 321 }; |
321 | 322 |
322 // Creates an instance of the update client. | 323 // Creates an instance of the update client. |
323 scoped_refptr<UpdateClient> UpdateClientFactory( | 324 scoped_refptr<UpdateClient> UpdateClientFactory( |
324 const scoped_refptr<Configurator>& config); | 325 const scoped_refptr<Configurator>& config); |
325 | 326 |
326 } // namespace update_client | 327 } // namespace update_client |
327 | 328 |
328 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_H_ | 329 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_H_ |
OLD | NEW |