| 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 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 CrxComponent(); | 192 CrxComponent(); |
| 193 CrxComponent(const CrxComponent& other); | 193 CrxComponent(const CrxComponent& other); |
| 194 ~CrxComponent(); | 194 ~CrxComponent(); |
| 195 | 195 |
| 196 // SHA256 hash of the CRX's public key. | 196 // SHA256 hash of the CRX's public key. |
| 197 std::vector<uint8_t> pk_hash; | 197 std::vector<uint8_t> pk_hash; |
| 198 scoped_refptr<CrxInstaller> installer; | 198 scoped_refptr<CrxInstaller> installer; |
| 199 | 199 |
| 200 // The current version if the CRX is updated. Otherwise, "0" or "0.0" if | 200 // The current version if the CRX is updated. Otherwise, "0" or "0.0" if |
| 201 // the CRX is installed. | 201 // the CRX is installed. |
| 202 Version version; | 202 base::Version version; |
| 203 | 203 |
| 204 std::string fingerprint; // Optional. | 204 std::string fingerprint; // Optional. |
| 205 std::string name; // Optional. | 205 std::string name; // Optional. |
| 206 std::vector<std::string> handled_mime_types; | 206 std::vector<std::string> handled_mime_types; |
| 207 | 207 |
| 208 // Optional. | 208 // Optional. |
| 209 // Valid values for the name part of an attribute match | 209 // Valid values for the name part of an attribute match |
| 210 // ^[-_a-zA-Z0-9]{1,256}$ and valid values the value part of an attribute | 210 // ^[-_a-zA-Z0-9]{1,256}$ and valid values the value part of an attribute |
| 211 // match ^[-.,;+_=a-zA-Z0-9]{0,256}$ . | 211 // match ^[-.,;+_=a-zA-Z0-9]{0,256}$ . |
| 212 InstallerAttributes installer_attributes; | 212 InstallerAttributes installer_attributes; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 virtual void Update(const std::vector<std::string>& ids, | 314 virtual void Update(const std::vector<std::string>& ids, |
| 315 const CrxDataCallback& crx_data_callback, | 315 const CrxDataCallback& crx_data_callback, |
| 316 const CompletionCallback& completion_callback) = 0; | 316 const CompletionCallback& completion_callback) = 0; |
| 317 | 317 |
| 318 // Sends an uninstall ping for the CRX identified by |id| and |version|. The | 318 // Sends an uninstall ping for the CRX identified by |id| and |version|. The |
| 319 // |reason| parameter is defined by the caller. The current implementation of | 319 // |reason| parameter is defined by the caller. The current implementation of |
| 320 // this function only sends a best-effort, fire-and-forget ping. It has no | 320 // this function only sends a best-effort, fire-and-forget ping. It has no |
| 321 // other side effects regarding installs or updates done through an instance | 321 // other side effects regarding installs or updates done through an instance |
| 322 // of this class. | 322 // of this class. |
| 323 virtual void SendUninstallPing(const std::string& id, | 323 virtual void SendUninstallPing(const std::string& id, |
| 324 const Version& version, | 324 const base::Version& version, |
| 325 int reason) = 0; | 325 int reason) = 0; |
| 326 | 326 |
| 327 // Returns status details about a CRX update. The function returns true in | 327 // Returns status details about a CRX update. The function returns true in |
| 328 // case of success and false in case of errors, such as |id| was | 328 // case of success and false in case of errors, such as |id| was |
| 329 // invalid or not known. | 329 // invalid or not known. |
| 330 virtual bool GetCrxUpdateState(const std::string& id, | 330 virtual bool GetCrxUpdateState(const std::string& id, |
| 331 CrxUpdateItem* update_item) const = 0; | 331 CrxUpdateItem* update_item) const = 0; |
| 332 | 332 |
| 333 // Returns true if the |id| is found in any running task. | 333 // Returns true if the |id| is found in any running task. |
| 334 virtual bool IsUpdating(const std::string& id) const = 0; | 334 virtual bool IsUpdating(const std::string& id) const = 0; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 349 scoped_refptr<UpdateClient> UpdateClientFactory( | 349 scoped_refptr<UpdateClient> UpdateClientFactory( |
| 350 const scoped_refptr<Configurator>& config); | 350 const scoped_refptr<Configurator>& config); |
| 351 | 351 |
| 352 // This must be called prior to the construction of any Configurator that | 352 // This must be called prior to the construction of any Configurator that |
| 353 // contains a PrefService. | 353 // contains a PrefService. |
| 354 void RegisterPrefs(PrefRegistrySimple* registry); | 354 void RegisterPrefs(PrefRegistrySimple* registry); |
| 355 | 355 |
| 356 } // namespace update_client | 356 } // namespace update_client |
| 357 | 357 |
| 358 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_H_ | 358 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_H_ |
| OLD | NEW |