| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 namespace update_client { | 137 namespace update_client { |
| 138 | 138 |
| 139 class Configurator; | 139 class Configurator; |
| 140 struct CrxUpdateItem; | 140 struct CrxUpdateItem; |
| 141 | 141 |
| 142 enum Error { | 142 enum Error { |
| 143 ERROR_UPDATE_INVALID_ARGUMENT = -1, | 143 ERROR_UPDATE_INVALID_ARGUMENT = -1, |
| 144 ERROR_UPDATE_IN_PROGRESS = 1, | 144 ERROR_UPDATE_IN_PROGRESS = 1, |
| 145 ERROR_UPDATE_CANCELED = 2, | 145 ERROR_UPDATE_CANCELED = 2, |
| 146 ERROR_UPDATE_RETRY_LATER = 3, |
| 146 }; | 147 }; |
| 147 | 148 |
| 148 // Defines an interface for a generic CRX installer. | 149 // Defines an interface for a generic CRX installer. |
| 149 class CrxInstaller : public base::RefCountedThreadSafe<CrxInstaller> { | 150 class CrxInstaller : public base::RefCountedThreadSafe<CrxInstaller> { |
| 150 public: | 151 public: |
| 151 // Called on the main thread when there was a problem unpacking or | 152 // Called on the main thread when there was a problem unpacking or |
| 152 // verifying the CRX. |error| is a non-zero value which is only meaningful | 153 // verifying the CRX. |error| is a non-zero value which is only meaningful |
| 153 // to the caller. | 154 // to the caller. |
| 154 virtual void OnUpdateError(int error) = 0; | 155 virtual void OnUpdateError(int error) = 0; |
| 155 | 156 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 virtual ~UpdateClient() {} | 321 virtual ~UpdateClient() {} |
| 321 }; | 322 }; |
| 322 | 323 |
| 323 // Creates an instance of the update client. | 324 // Creates an instance of the update client. |
| 324 scoped_refptr<UpdateClient> UpdateClientFactory( | 325 scoped_refptr<UpdateClient> UpdateClientFactory( |
| 325 const scoped_refptr<Configurator>& config); | 326 const scoped_refptr<Configurator>& config); |
| 326 | 327 |
| 327 } // namespace update_client | 328 } // namespace update_client |
| 328 | 329 |
| 329 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_H_ | 330 #endif // COMPONENTS_UPDATE_CLIENT_UPDATE_CLIENT_H_ |
| OLD | NEW |