/system/update_engine/common/ |
D | prefs_unittest.cc | 46 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 | payload_state.cc | 55 : prefs_(nullptr), in PayloadState() 73 prefs_ = system_state_->prefs(); in Initialize() 646 prefs_->SetBoolean(kPrefsAttemptInProgress, true); in PersistAttemptMetrics() 650 prefs_->Delete(kPrefsAttemptInProgress); in ClearPersistedAttemptMetrics() 655 if (!prefs_->GetBoolean(kPrefsAttemptInProgress, &attempt_in_progress)) in ReportAndClearPersistedAttemptMetrics() 711 prefs_->Delete(kPrefsUpdateTimestampStart); in CollectAndReportSuccessfulUpdateMetrics() 712 prefs_->Delete(kPrefsUpdateDurationUptime); in CollectAndReportSuccessfulUpdateMetrics() 745 CHECK(prefs_); in SetNumReboots() 747 prefs_->SetInt64(kPrefsNumReboots, num_reboots); in SetNumReboots() 786 CHECK(prefs_); in GetPersistedValue() [all …]
|
D | certificate_checker_unittest.cc | 61 MockPrefs prefs_; member in chromeos_update_engine::CertificateCheckerTest 74 CertificateChecker cert_checker{&prefs_, &openssl_wrapper_}; 85 EXPECT_CALL(prefs_, GetString(cert_key_, _)).WillOnce(Return(false)); in TEST_F() 86 EXPECT_CALL(prefs_, SetString(cert_key_, digest_hex_)).WillOnce(Return(true)); in TEST_F() 102 EXPECT_CALL(prefs_, GetString(cert_key_, _)) in TEST_F() 104 EXPECT_CALL(prefs_, SetString(_, _)).Times(0); in TEST_F() 120 EXPECT_CALL(prefs_, GetString(cert_key_, _)) in TEST_F() 125 EXPECT_CALL(prefs_, SetString(cert_key_, digest_hex_)).WillOnce(Return(true)); in TEST_F() 134 EXPECT_CALL(prefs_, GetString(_, _)).Times(0); in TEST_F()
|
D | update_attempter_android.cc | 85 prefs_(prefs), in UpdateAttempterAndroid() 165 DeltaPerformer::CanResumeUpdate(prefs_, payload_id); in ApplyPayload() 167 if (!DeltaPerformer::ResetUpdateProgress(prefs_, false)) { in ApplyPayload() 170 if (!prefs_->SetString(kPrefsUpdateCheckResponseHash, payload_id)) { in ApplyPayload() 254 bool ret_value = prefs_->Delete(kPrefsUpdateCompletedOnBootId); in ResetStatus() 294 prefs_->SetInt64(kPrefsDeltaUpdateFailures, 0); in ProcessingDone() 295 DeltaPerformer::ResetUpdateProgress(prefs_, false); in ProcessingDone() 307 DeltaPerformer::ResetUpdateProgress(prefs_, false); in ProcessingDone() 457 prefs_, in BuildUpdateActions() 499 prefs_->GetInt64(kPrefsManifestMetadataSize, &manifest_metadata_size); in SetupDownload() [all …]
|
D | update_attempter.cc | 151 prefs_ = system_state_->prefs(); in Init() 501 if (prefs_->GetInt64(kPrefsWallClockWaitPeriod, &wait_period_in_secs) && in CalculateScatteringParams() 561 prefs_->Delete(kPrefsWallClockWaitPeriod); in CalculateScatteringParams() 562 prefs_->Delete(kPrefsUpdateCheckCount); in CalculateScatteringParams() 631 prefs_, in BuildUpdateActions() 838 prefs_->SetString(kPrefsUpdateCompletedOnBootId, boot_id); in WriteUpdateCompletedMarker() 841 prefs_->SetInt64(kPrefsUpdateCompletedBootTime, value); in WriteUpdateCompletedMarker() 941 prefs_->SetInt64(kPrefsDeltaUpdateFailures, 0); in ProcessingDone() 942 prefs_->SetString(kPrefsPreviousVersion, in ProcessingDone() 944 DeltaPerformer::ResetUpdateProgress(prefs_, false); in ProcessingDone() [all …]
|
D | certificate_checker.cc | 62 : prefs_(prefs), openssl_wrapper_(openssl_wrapper) { in CertificateChecker() 137 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 | 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 | real_system_state.cc | 88 prefs_.reset(prefs = new Prefs()); in Initialize() 112 system_rebooted_ = (!prefs_->GetString(kPrefsBootId, &prev_boot_id) || in Initialize() 114 prefs_->SetString(kPrefsBootId, boot_id); in Initialize() 130 new CertificateChecker(prefs_.get(), &openssl_wrapper_)); in Initialize()
|
D | fake_system_state.h | 74 inline PrefsInterface* prefs() override { return prefs_; } in prefs() 134 prefs_ = prefs ? prefs : &mock_prefs_; in set_prefs() 200 CHECK(prefs_ == &mock_prefs_); in mock_prefs() 257 PrefsInterface* prefs_; variable
|
D | update_attempter_unittest.cc | 145 prefs_ = fake_system_state_.mock_prefs(); in SetUp() 209 NiceMock<MockPrefs>* prefs_; // Shortcut to fake_system_state_->mock_prefs(). member in chromeos_update_engine::UpdateAttempterTest 225 DownloadAction action(prefs_, nullptr, nullptr, nullptr, fetcher.release()); in TEST_F() 226 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)).Times(0); in TEST_F() 237 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)) in TEST_F() 253 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)).Times(0); in TEST_F() 306 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)) in TEST_F() 310 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)) in TEST_F() 316 EXPECT_CALL(*prefs_, GetInt64(kPrefsDeltaUpdateFailures, _)) in TEST_F() 322 EXPECT_CALL(*prefs_, GetInt64(_, _)).Times(0); in TEST_F() [all …]
|
D | real_system_state.h | 98 inline PrefsInterface* prefs() override { return prefs_.get(); } in prefs() 161 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 | certificate_checker.h | 162 PrefsInterface* prefs_; variable
|
D | update_attempter_android.h | 128 PrefsInterface* prefs_; variable
|
D | update_attempter.h | 436 PrefsInterface* prefs_ = nullptr; variable
|
D | payload_state.h | 428 PrefsInterface* prefs_; variable
|
/system/update_engine/update_manager/ |
D | real_updater_provider.cc | 310 prefs_(prefs), in BooleanPrefVariable() 317 prefs_->RemoveObserver(key_, this); in ~BooleanPrefVariable() 325 if (prefs_ && prefs_->Exists(key_) && !prefs_->GetBoolean(key_, &result)) in OnPrefSet() 335 chromeos_update_engine::PrefsInterface* prefs_; member in chromeos_update_manager::BooleanPrefVariable
|
/system/update_engine/payload_consumer/ |
D | delta_performer.cc | 627 LOG_IF(WARNING, !prefs_->SetInt64(kPrefsManifestMetadataSize, in Write() 630 LOG_IF(WARNING, !prefs_->SetInt64(kPrefsManifestSignatureSize, in Write() 1331 LOG_IF(WARNING, !prefs_->SetString(kPrefsUpdateStateSignatureBlob, in ExtractSignatureMessage() 1802 ResetUpdateProgress(prefs_, true); in CheckpointUpdateProgress() 1804 prefs_->SetString(kPrefsUpdateStateSHA256Context, in CheckpointUpdateProgress() 1807 prefs_->SetString(kPrefsUpdateStateSignedSHA256Context, in CheckpointUpdateProgress() 1809 TEST_AND_RETURN_FALSE(prefs_->SetInt64(kPrefsUpdateStateNextDataOffset, in CheckpointUpdateProgress() 1821 TEST_AND_RETURN_FALSE(prefs_->SetInt64(kPrefsUpdateStateNextDataLength, in CheckpointUpdateProgress() 1824 TEST_AND_RETURN_FALSE(prefs_->SetInt64(kPrefsUpdateStateNextDataLength, in CheckpointUpdateProgress() 1828 TEST_AND_RETURN_FALSE(prefs_->SetInt64(kPrefsUpdateStateNextOperation, in CheckpointUpdateProgress() [all …]
|
D | delta_performer.h | 82 : prefs_(prefs), in DeltaPerformer() 299 PrefsInterface* prefs_; variable
|
D | download_action.cc | 46 : prefs_(prefs), in DownloadAction() 189 prefs_, boot_control_, hardware_, delegate_, &install_plan_)); in PerformAction()
|
D | download_action.h | 138 PrefsInterface* prefs_; variable
|
D | delta_performer_unittest.cc | 330 FakePrefs prefs_; member in chromeos_update_engine::DeltaPerformerTest 336 &prefs_, &fake_boot_control_, &fake_hardware_, &mock_delegate_, &install_plan_};
|