| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_COMPONENT_H_ | 5 #ifndef COMPONENTS_UPDATE_CLIENT_COMPONENT_H_ |
| 6 #define COMPONENTS_UPDATE_CLIENT_COMPONENT_H_ | 6 #define COMPONENTS_UPDATE_CLIENT_COMPONENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 int diff_error_category() const { return diff_error_category_; } | 127 int diff_error_category() const { return diff_error_category_; } |
| 128 int diff_error_code() const { return diff_error_code_; } | 128 int diff_error_code() const { return diff_error_code_; } |
| 129 int diff_extra_code1() const { return diff_extra_code1_; } | 129 int diff_extra_code1() const { return diff_extra_code1_; } |
| 130 | 130 |
| 131 private: | 131 private: |
| 132 friend class FakePingManagerImpl; | 132 friend class FakePingManagerImpl; |
| 133 friend class UpdateCheckerTest; | 133 friend class UpdateCheckerTest; |
| 134 | 134 |
| 135 FRIEND_TEST_ALL_PREFIXES(PingManagerTest, SendPing); | 135 FRIEND_TEST_ALL_PREFIXES(PingManagerTest, SendPing); |
| 136 FRIEND_TEST_ALL_PREFIXES(PingManagerTest, RequiresEncryption); | 136 FRIEND_TEST_ALL_PREFIXES(PingManagerTest, RequiresEncryption); |
| 137 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, NoUpdateActionRun); |
| 137 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, UpdateCheckCupError); | 138 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, UpdateCheckCupError); |
| 138 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, UpdateCheckError); | 139 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, UpdateCheckError); |
| 139 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, UpdateCheckInvalidAp); | 140 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, UpdateCheckInvalidAp); |
| 140 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, | 141 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, |
| 141 UpdateCheckRequiresEncryptionError); | 142 UpdateCheckRequiresEncryptionError); |
| 142 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, UpdateCheckSuccess); | 143 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, UpdateCheckSuccess); |
| 143 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, UpdateCheckUpdateDisabled); | 144 FRIEND_TEST_ALL_PREFIXES(UpdateCheckerTest, UpdateCheckUpdateDisabled); |
| 144 | 145 |
| 145 // Describes an abstraction for implementing the behavior of a component and | 146 // Describes an abstraction for implementing the behavior of a component and |
| 146 // the transition from one state to another. | 147 // the transition from one state to another. |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 // The cryptographic hash values for the component payload. | 389 // The cryptographic hash values for the component payload. |
| 389 std::string hash_sha256_; | 390 std::string hash_sha256_; |
| 390 std::string hashdiff_sha256_; | 391 std::string hashdiff_sha256_; |
| 391 | 392 |
| 392 // The from/to version and fingerprint values. | 393 // The from/to version and fingerprint values. |
| 393 base::Version previous_version_; | 394 base::Version previous_version_; |
| 394 base::Version next_version_; | 395 base::Version next_version_; |
| 395 std::string previous_fp_; | 396 std::string previous_fp_; |
| 396 std::string next_fp_; | 397 std::string next_fp_; |
| 397 | 398 |
| 399 // Contains the file name of the payload to run. |
| 400 std::string action_run_; |
| 401 |
| 398 // True if the update check response for this component includes an update. | 402 // True if the update check response for this component includes an update. |
| 399 bool is_update_available_ = false; | 403 bool is_update_available_ = false; |
| 400 | 404 |
| 401 // True if the current update check cycle is on-demand. | 405 // True if the current update check cycle is on-demand. |
| 402 bool on_demand_ = false; | 406 bool on_demand_ = false; |
| 403 | 407 |
| 404 // The error reported by the update checker. | 408 // The error reported by the update checker. |
| 405 int update_check_error_ = 0; | 409 int update_check_error_ = 0; |
| 406 | 410 |
| 407 base::FilePath crx_path_; | 411 base::FilePath crx_path_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 428 base::Closure update_check_complete_; | 432 base::Closure update_check_complete_; |
| 429 | 433 |
| 430 DISALLOW_COPY_AND_ASSIGN(Component); | 434 DISALLOW_COPY_AND_ASSIGN(Component); |
| 431 }; | 435 }; |
| 432 | 436 |
| 433 using IdToComponentPtrMap = std::map<std::string, std::unique_ptr<Component>>; | 437 using IdToComponentPtrMap = std::map<std::string, std::unique_ptr<Component>>; |
| 434 | 438 |
| 435 } // namespace update_client | 439 } // namespace update_client |
| 436 | 440 |
| 437 #endif // COMPONENTS_UPDATE_CLIENT_COMPONENT_H_ | 441 #endif // COMPONENTS_UPDATE_CLIENT_COMPONENT_H_ |
| OLD | NEW |