/system/update_engine/common/ |
D | prefs_unittest.cc | 48 ASSERT_TRUE(prefs_.Init(prefs_dir_)); in SetUp() 59 Prefs prefs_; member in chromeos_update_engine::PrefsTest 66 EXPECT_TRUE(prefs_.file_storage_.GetFileNameForKey(kAllvalidCharsKey, &path)); in TEST_F() 72 EXPECT_FALSE(prefs_.file_storage_.GetFileNameForKey("ABC abc", &path)); in TEST_F() 77 EXPECT_FALSE(prefs_.file_storage_.GetFileNameForKey("", &path)); in TEST_F() 84 EXPECT_TRUE(prefs_.GetString(kKey, &value)); in TEST_F() 90 EXPECT_FALSE(prefs_.GetString(",bad", &value)); in TEST_F() 95 EXPECT_FALSE(prefs_.GetString("non-existent-key", &value)); in TEST_F() 100 EXPECT_TRUE(prefs_.SetString(kKey, kValue)); in TEST_F() 108 EXPECT_FALSE(prefs_.SetString(kKeyWithDots, "some value")); in TEST_F() [all …]
|
/system/update_engine/ |
D | update_attempter_android_unittest.cc | 67 &daemon_state_, &prefs_, &boot_control_, &hardware_}; 70 FakePrefs prefs_; member in chromeos_update_engine::UpdateAttempterAndroidTest 81 prefs_.SetString(kPrefsPreviousVersion, build_version); in TEST_F() 82 prefs_.SetString(kPrefsBootId, "oldboot"); in TEST_F() 83 prefs_.SetInt64(kPrefsNumReboots, 1); in TEST_F() 91 EXPECT_TRUE(prefs_.Exists(kPrefsBootId)); in TEST_F() 93 EXPECT_TRUE(prefs_.GetString(kPrefsBootId, &prefs_boot_id)); in TEST_F() 96 EXPECT_TRUE(prefs_.Exists(kPrefsNumReboots)); in TEST_F() 98 EXPECT_TRUE(prefs_.GetInt64(kPrefsNumReboots, &reboot_count)); in TEST_F() 103 prefs_.SetString(kPrefsPreviousVersion, "00001"); // Set the fake version in TEST_F() [all …]
|
D | payload_state.cc | 62 : prefs_(nullptr), in PayloadState() 80 prefs_ = system_state_->prefs(); in Initialize() 255 metrics_utils::SetSystemUpdatedMarker(system_state_->clock(), prefs_); in UpdateSucceeded() 423 !prefs_->Exists(kPrefsNoIgnoreBackoff)) { in ShouldBackoffDownload() 683 prefs_->SetBoolean(kPrefsAttemptInProgress, true); in PersistAttemptMetrics() 687 prefs_->Delete(kPrefsAttemptInProgress); in ClearPersistedAttemptMetrics() 692 if (!prefs_->GetBoolean(kPrefsAttemptInProgress, &attempt_in_progress)) in ReportAndClearPersistedAttemptMetrics() 750 prefs_->Delete(kPrefsUpdateTimestampStart); in CollectAndReportSuccessfulUpdateMetrics() 751 prefs_->Delete(kPrefsUpdateDurationUptime); in CollectAndReportSuccessfulUpdateMetrics() 786 metrics_utils::SetNumReboots(num_reboots, prefs_); in SetNumReboots() [all …]
|
D | update_attempter_android.cc | 138 prefs_(prefs), in UpdateAttempterAndroid() 225 DeltaPerformer::CanResumeUpdate(prefs_, payload_id); in ApplyPayload() 232 prefs_, in ApplyPayload() 237 if (!prefs_->SetString(kPrefsUpdateCheckResponseHash, payload_id)) { in ApplyPayload() 255 if (install_plan_.is_resume && prefs_->Exists(kPrefsVerityWritten)) { in ApplyPayload() 257 if (prefs_->GetBoolean(kPrefsVerityWritten, &verity_written) && in ApplyPayload() 354 if (!boot_control_->GetDynamicPartitionControl()->ResetUpdate(prefs_)) { in ResetStatus() 378 if (!boot_control_->GetDynamicPartitionControl()->ResetUpdate(prefs_)) in ResetStatus() 384 if (!prefs_->Delete(kPrefsUpdateCompletedOnBootId)) in ResetStatus() 533 prefs_->SetInt64(kPrefsDeltaUpdateFailures, 0); in ProcessingDone() [all …]
|
D | certificate_checker_unittest.cc | 59 MockPrefs prefs_; member in chromeos_update_engine::CertificateCheckerTest 72 CertificateChecker cert_checker{&prefs_, &openssl_wrapper_}; 82 EXPECT_CALL(prefs_, GetString(cert_key_, _)).WillOnce(Return(false)); in TEST_F() 83 EXPECT_CALL(prefs_, SetString(cert_key_, digest_hex_)).WillOnce(Return(true)); in TEST_F() 98 EXPECT_CALL(prefs_, GetString(cert_key_, _)) in TEST_F() 100 EXPECT_CALL(prefs_, SetString(_, _)).Times(0); in TEST_F() 115 EXPECT_CALL(prefs_, GetString(cert_key_, _)) in TEST_F() 120 EXPECT_CALL(prefs_, SetString(cert_key_, digest_hex_)).WillOnce(Return(true)); in TEST_F() 130 EXPECT_CALL(prefs_, GetString(_, _)).Times(0); in TEST_F()
|
D | daemon_state_android.cc | 55 prefs_.reset(prefs); in Initialize() 63 new CertificateChecker(prefs_.get(), &openssl_wrapper_)); in Initialize() 68 this, prefs_.get(), boot_control_.get(), hardware_.get())); in Initialize()
|
D | update_attempter.cc | 140 prefs_ = system_state_->prefs(); in Init() 496 if (prefs_->GetInt64(kPrefsWallClockScatteringWaitPeriod, in CalculateScatteringParams() 557 prefs_->Delete(kPrefsWallClockScatteringWaitPeriod); in CalculateScatteringParams() 558 prefs_->Delete(kPrefsUpdateCheckCount); in CalculateScatteringParams() 590 device_policy, prefs_, &staging_wait_time_, &staging_schedule_); in CalculateStagingParams() 595 prefs_->Delete(kPrefsWallClockStagingWaitPeriod); in CalculateStagingParams() 603 prefs_->SetInt64(kPrefsWallClockStagingWaitPeriod, in CalculateStagingParams() 616 prefs_->Delete(kPrefsWallClockScatteringWaitPeriod); in CalculateStagingParams() 651 std::make_unique<DownloadAction>(prefs_, in BuildUpdateActions() 898 prefs_->SetString(kPrefsUpdateCompletedOnBootId, boot_id); in WriteUpdateCompletedMarker() [all …]
|
D | certificate_checker.cc | 62 : prefs_(prefs), openssl_wrapper_(openssl_wrapper) {} in CertificateChecker() 138 TEST_AND_RETURN_FALSE(prefs_ != nullptr); in CheckCertificateChange() 169 if (!prefs_->GetString(storage_key, &stored_digest)) { in CheckCertificateChange() 170 if (!prefs_->SetString(storage_key, digest_string)) { in CheckCertificateChange() 181 if (!prefs_->SetString(storage_key, digest_string)) { in CheckCertificateChange()
|
D | real_system_state.cc | 107 prefs_.reset(prefs = new Prefs()); in Initialize() 131 system_rebooted_ = (!prefs_->GetString(kPrefsBootId, &prev_boot_id) || in Initialize() 133 prefs_->SetString(kPrefsBootId, boot_id); in Initialize() 149 new CertificateChecker(prefs_.get(), &openssl_wrapper_)); in Initialize()
|
D | fake_system_state.h | 75 inline PrefsInterface* prefs() override { return prefs_; } in prefs() 135 prefs_ = prefs ? prefs : &mock_prefs_; in set_prefs() 205 CHECK(prefs_ == &mock_prefs_); in mock_prefs() 262 PrefsInterface* prefs_; variable
|
D | update_attempter_unittest.cc | 155 prefs_ = fake_system_state_.mock_prefs(); in SetUp() 216 NiceMock<MockPrefs>* prefs_; // Shortcut to fake_system_state_->mock_prefs(). member in chromeos_update_engine::UpdateAttempterTest 233 DownloadAction action(prefs_, in TEST_F() 239 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)).Times(0); in TEST_F() 250 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)) in TEST_F() 346 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)).Times(0); in TEST_F() 394 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)) in TEST_F() 398 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)) in TEST_F() 404 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)) in TEST_F() 410 EXPECT_CALL(*prefs_, GetInt64(_, _)).Times(0); in TEST_F() [all …]
|
D | cleanup_previous_update_action.cc | 61 : prefs_(prefs), in CleanupPreviousUpdateAction() 79 CHECK(prefs_); in ResumeAction() 314 prefs_, in BeforeCancel() 324 ignore_result(prefs_->GetString(kPrefsDynamicPartitionMetadataUpdated, &val)); in BeforeCancel()
|
D | real_system_state.h | 100 inline PrefsInterface* prefs() override { return prefs_.get(); } in prefs() 167 std::unique_ptr<PrefsInterface> prefs_; variable
|
D | fake_system_state.cc | 31 prefs_(&mock_prefs_), in FakeSystemState()
|
D | daemon_state_android.h | 63 std::unique_ptr<PrefsInterface> prefs_; variable
|
D | cleanup_previous_update_action.h | 68 PrefsInterface* prefs_;
|
D | certificate_checker.h | 162 PrefsInterface* prefs_; variable
|
D | update_attempter_android.h | 199 PrefsInterface* prefs_; variable
|
D | payload_state.h | 424 PrefsInterface* prefs_; variable
|
D | update_attempter.h | 440 PrefsInterface* prefs_ = nullptr; variable
|
/system/update_engine/payload_consumer/ |
D | download_action.cc | 48 : prefs_(prefs), in DownloadAction() 186 if (prefs_->GetInt64(kPrefsUpdateStatePayloadIndex, &payload_index) && in PerformAction() 217 prefs_->GetInt64(kPrefsManifestMetadataSize, &manifest_metadata_size); in StartDownloading() 218 prefs_->GetInt64(kPrefsManifestSignatureSize, &manifest_signature_size); in StartDownloading() 225 prefs_->GetInt64(kPrefsUpdateStateNextDataOffset, &next_data_offset); in StartDownloading() 247 delta_performer_.reset(new DeltaPerformer(prefs_, in StartDownloading() 381 DeltaPerformer::ResetUpdateProgress(prefs_, false); in TransferComplete()
|
D | delta_performer.cc | 635 !prefs_->SetInt64(kPrefsManifestMetadataSize, metadata_size_)) in Write() 638 !prefs_->SetInt64(kPrefsManifestSignatureSize, in Write() 954 ignore_result(prefs_->GetString(kPrefsUpdateCheckResponseHash, in PreparePartitionsForUpdate() 956 return PreparePartitionsForUpdate(prefs_, in PreparePartitionsForUpdate() 1658 !prefs_->SetString(kPrefsUpdateStateSignatureBlob, in ExtractSignatureMessage() 2012 ResetUpdateProgress(prefs_, true); in CheckpointUpdateProgress() 2013 TEST_AND_RETURN_FALSE(prefs_->SetString( in CheckpointUpdateProgress() 2016 prefs_->SetString(kPrefsUpdateStateSignedSHA256Context, in CheckpointUpdateProgress() 2019 prefs_->SetInt64(kPrefsUpdateStateNextDataOffset, buffer_offset_)); in CheckpointUpdateProgress() 2032 prefs_->SetInt64(kPrefsUpdateStateNextDataLength, op.data_length())); in CheckpointUpdateProgress() [all …]
|
D | delta_performer.h | 75 : prefs_(prefs), in DeltaPerformer() 319 PrefsInterface* prefs_; variable
|
D | download_action.h | 144 PrefsInterface* prefs_; variable
|
/system/update_engine/update_manager/ |
D | real_updater_provider.cc | 312 prefs_(prefs), in BooleanPrefVariable() 318 ~BooleanPrefVariable() { prefs_->RemoveObserver(key_, this); } in ~BooleanPrefVariable() 325 if (prefs_ && prefs_->Exists(key_) && !prefs_->GetBoolean(key_, &result)) in OnPrefSet() 333 chromeos_update_engine::PrefsInterface* prefs_; member in chromeos_update_manager::BooleanPrefVariable
|