Home
last modified time | relevance | path

Searched refs:prefs_ (Results 1 – 25 of 28) sorted by relevance

12

/system/update_engine/common/
Dprefs_unittest.cc148 ASSERT_TRUE(prefs_.Init(prefs_dir_)); in SetUp()
149 common_prefs_ = &prefs_; in SetUp()
160 Prefs prefs_; member in chromeos_update_engine::PrefsTest
192 EXPECT_TRUE(prefs_.file_storage_.GetFileNameForKey(kAllvalidCharsKey, &path)); in TEST_F()
198 EXPECT_FALSE(prefs_.file_storage_.GetFileNameForKey("ABC abc", &path)); in TEST_F()
203 EXPECT_FALSE(prefs_.file_storage_.GetFileNameForKey("", &path)); in TEST_F()
222 EXPECT_TRUE(prefs_.GetString(kKey, &value)); in TEST_F()
228 EXPECT_FALSE(prefs_.GetString(",bad", &value)); in TEST_F()
233 EXPECT_FALSE(prefs_.GetString("non-existent-key", &value)); in TEST_F()
238 EXPECT_TRUE(prefs_.SetString(kKey, kValue)); in TEST_F()
[all …]
Ddownload_action.h124 PrefsInterface* prefs_; variable
/system/update_engine/aosp/
Dupdate_attempter_android_unittest.cc68 FakePrefs prefs_; member in chromeos_update_engine::UpdateAttempterAndroidTest
73 &daemon_state_, &prefs_, &boot_control_, &hardware_, nullptr};
82 prefs_.SetString(kPrefsPreviousVersion, build_version); in TEST_F()
83 prefs_.SetString(kPrefsBootId, "oldboot"); in TEST_F()
84 prefs_.SetInt64(kPrefsNumReboots, 1); in TEST_F()
85 prefs_.SetInt64(kPrefsPreviousSlot, 1); in TEST_F()
94 ASSERT_TRUE(prefs_.Exists(kPrefsBootId)); in TEST_F()
96 ASSERT_TRUE(prefs_.GetString(kPrefsBootId, &prefs_boot_id)); in TEST_F()
99 ASSERT_TRUE(prefs_.Exists(kPrefsNumReboots)); in TEST_F()
101 ASSERT_TRUE(prefs_.GetInt64(kPrefsNumReboots, &reboot_count)); in TEST_F()
[all …]
Dupdate_attempter_android.cc138 prefs_(prefs), in UpdateAttempterAndroid()
227 DeltaPerformer::CanResumeUpdate(prefs_, payload_id); in ApplyPayload()
234 prefs_, in ApplyPayload()
239 if (!prefs_->SetString(kPrefsUpdateCheckResponseHash, payload_id)) { in ApplyPayload()
257 if (install_plan_.is_resume && prefs_->Exists(kPrefsVerityWritten)) { in ApplyPayload()
259 if (prefs_->GetBoolean(kPrefsVerityWritten, &verity_written) && in ApplyPayload()
375 if (!boot_control_->GetDynamicPartitionControl()->ResetUpdate(prefs_)) { in ResetStatus()
402 if (!boot_control_->GetDynamicPartitionControl()->ResetUpdate(prefs_)) in ResetStatus()
408 if (!prefs_->Delete(kPrefsUpdateCompletedOnBootId)) in ResetStatus()
557 prefs_->SetInt64(kPrefsDeltaUpdateFailures, 0); in ProcessingDone()
[all …]
Ddaemon_state_android.cc50 prefs_.reset(new MemoryPrefs()); in Initialize()
55 prefs_.reset(prefs); in Initialize()
64 new CertificateChecker(prefs_.get(), &openssl_wrapper_)); in Initialize()
69 prefs_.get(), in Initialize()
Ddaemon_state_android.h63 std::unique_ptr<PrefsInterface> prefs_; variable
Dcleanup_previous_update_action.cc62 : prefs_(prefs), in CleanupPreviousUpdateAction()
146 CHECK(prefs_); in StartActionInternal()
372 prefs_, in BeforeCancel()
382 ignore_result(prefs_->GetString(kPrefsDynamicPartitionMetadataUpdated, &val)); in BeforeCancel()
Dcleanup_previous_update_action.h70 PrefsInterface* prefs_;
Dupdate_attempter_android.h206 PrefsInterface* prefs_; variable
/system/update_engine/cros/
Dpayload_state.cc63 : prefs_(nullptr), in PayloadState()
82 prefs_ = SystemState::Get()->prefs(); in Initialize()
258 metrics_utils::SetSystemUpdatedMarker(SystemState::Get()->clock(), prefs_); in UpdateSucceeded()
428 !prefs_->Exists(kPrefsNoIgnoreBackoff)) { in ShouldBackoffDownload()
707 prefs_->SetBoolean(kPrefsAttemptInProgress, true); in PersistAttemptMetrics()
711 prefs_->Delete(kPrefsAttemptInProgress); in ClearPersistedAttemptMetrics()
716 if (!prefs_->GetBoolean(kPrefsAttemptInProgress, &attempt_in_progress)) in ReportAndClearPersistedAttemptMetrics()
775 prefs_->Delete(kPrefsUpdateTimestampStart); in CollectAndReportSuccessfulUpdateMetrics()
776 prefs_->Delete(kPrefsUpdateDurationUptime); in CollectAndReportSuccessfulUpdateMetrics()
811 metrics_utils::SetNumReboots(num_reboots, prefs_); in SetNumReboots()
[all …]
Dupdate_attempter.cc151 prefs_ = SystemState::Get()->prefs(); in Init()
163 prefs_->Delete(kPrefsLastFp, {kDlcPrefsSubDir}); in Init()
493 if (prefs_->GetInt64(kPrefsWallClockScatteringWaitPeriod, in CalculateScatteringParams()
554 prefs_->Delete(kPrefsWallClockScatteringWaitPeriod); in CalculateScatteringParams()
555 prefs_->Delete(kPrefsUpdateCheckCount); in CalculateScatteringParams()
592 prefs_->Delete(kPrefsWallClockStagingWaitPeriod); in CalculateStagingParams()
600 prefs_->SetInt64(kPrefsWallClockStagingWaitPeriod, in CalculateStagingParams()
615 prefs_->Delete(kPrefsWallClockScatteringWaitPeriod); in CalculateStagingParams()
624 auto key = prefs_->CreateSubKey({kDlcPrefsSubDir, dlc_id, sub_key}); in ResetDlcPrefs()
625 if (!prefs_->Delete(key)) in ResetDlcPrefs()
[all …]
Dreal_system_state.cc91 prefs_.reset(prefs = new Prefs()); in Initialize()
115 system_rebooted_ = (!prefs_->GetString(kPrefsBootId, &prev_boot_id) || in Initialize()
117 prefs_->SetString(kPrefsBootId, boot_id); in Initialize()
133 new CertificateChecker(prefs_.get(), &openssl_wrapper_)); in Initialize()
Ddownload_action_chromeos.cc49 : prefs_(prefs), in DownloadActionChromeos()
183 if (prefs_->GetInt64(kPrefsUpdateStatePayloadIndex, &payload_index) && in PerformAction()
208 if (!prefs_->GetString(kPrefsManifestBytes, &cached_manifest_bytes) || in LoadCachedManifest()
241 delta_performer_.reset(new DeltaPerformer(prefs_, in StartDownloading()
256 prefs_->GetInt64(kPrefsManifestMetadataSize, &manifest_metadata_size); in StartDownloading()
257 prefs_->GetInt64(kPrefsManifestSignatureSize, &manifest_signature_size); in StartDownloading()
263 delta_performer_ = std::make_unique<DeltaPerformer>(prefs_, in StartDownloading()
280 prefs_->GetInt64(kPrefsUpdateStateNextDataOffset, &next_data_offset); in StartDownloading()
426 DeltaPerformer::ResetUpdateProgress(prefs_, false); in TransferComplete()
Dfake_system_state.h86 inline PrefsInterface* prefs() override { return prefs_; } in prefs()
146 prefs_ = prefs ? prefs : &mock_prefs_; in set_prefs()
211 CHECK(prefs_ == &fake_prefs_); in fake_prefs()
226 CHECK(prefs_ == &mock_prefs_); in mock_prefs()
289 PrefsInterface* prefs_; variable
Dreal_system_state.h85 PrefsInterface* prefs() override { return prefs_.get(); } in prefs()
148 std::unique_ptr<PrefsInterface> prefs_; variable
Dfake_system_state.cc29 prefs_(&fake_prefs_), in FakeSystemState()
Dupdate_attempter_unittest.cc232 prefs_ = FakeSystemState::Get()->fake_prefs(); in SetUp()
234 new CertificateChecker(prefs_, &openssl_wrapper_)); in SetUp()
325 FakePrefs* prefs_; member in chromeos_update_engine::UpdateAttempterTest
501 prefs_, nullptr, nullptr, fetcher.release(), false /* interactive */); in TEST_F()
503 EXPECT_FALSE(prefs_->Exists(kPrefsDeltaUpdateFailures)); in TEST_F()
606 EXPECT_FALSE(prefs_->Exists(kPrefsDeltaUpdateFailures)); in TEST_F()
654 prefs_->SetInt64(kPrefsDeltaUpdateFailures, in TEST_F()
658 prefs_->SetInt64(kPrefsDeltaUpdateFailures, in TEST_F()
669 EXPECT_TRUE(prefs_->SetInt64(kPrefsDeltaUpdateFailures, -1)); in TEST_F()
672 EXPECT_TRUE(prefs_->GetInt64(kPrefsDeltaUpdateFailures, &value)); in TEST_F()
[all …]
Ddownload_action_chromeos.h119 PrefsInterface* prefs_; variable
/system/update_engine/
Dcertificate_checker_unittest.cc59 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()
Ddownload_action.cc45 : prefs_(prefs), in DownloadAction()
71 if (prefs_->GetInt64(kPrefsUpdateStatePayloadIndex, &payload_index) && in PerformAction()
96 if (!prefs_->GetString(kPrefsManifestBytes, &cached_manifest_bytes) || in LoadCachedManifest()
129 delta_performer_.reset(new DeltaPerformer(prefs_, in StartDownloading()
143 prefs_->GetInt64(kPrefsManifestMetadataSize, &manifest_metadata_size); in StartDownloading()
144 prefs_->GetInt64(kPrefsManifestSignatureSize, &manifest_signature_size); in StartDownloading()
150 delta_performer_ = std::make_unique<DeltaPerformer>(prefs_, in StartDownloading()
166 prefs_->GetInt64(kPrefsUpdateStateNextDataOffset, &next_data_offset); in StartDownloading()
Dcertificate_checker.cc62 : 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()
Dcertificate_checker.h162 PrefsInterface* prefs_; variable
/system/update_engine/payload_consumer/
Ddelta_performer.cc440 prefs_->SetString(kPrefsManifestBytes, {begin, buffer_.size()}); in Write()
466 !prefs_->SetInt64(kPrefsManifestMetadataSize, metadata_size_)) in Write()
469 !prefs_->SetInt64(kPrefsManifestSignatureSize, in Write()
780 ignore_result(prefs_->GetString(kPrefsUpdateCheckResponseHash, in PreparePartitionsForUpdate()
782 return PreparePartitionsForUpdate(prefs_, in PreparePartitionsForUpdate()
1412 ResetUpdateProgress(prefs_, true); in CheckpointUpdateProgress()
1424 !prefs_->SetString(kPrefsUpdateStateSignatureBlob, in CheckpointUpdateProgress()
1428 TEST_AND_RETURN_FALSE(prefs_->SetString( in CheckpointUpdateProgress()
1431 prefs_->SetString(kPrefsUpdateStateSignedSHA256Context, in CheckpointUpdateProgress()
1434 prefs_->SetInt64(kPrefsUpdateStateNextDataOffset, buffer_offset_)); in CheckpointUpdateProgress()
[all …]
Ddelta_performer.h75 : prefs_(prefs), in DeltaPerformer()
331 PrefsInterface* prefs_; variable
Ddelta_performer_unittest.cc435 FakePrefs prefs_; member in chromeos_update_engine::DeltaPerformerTest
442 DeltaPerformer performer_{&prefs_,
1109 prefs_.SetString(kPrefsUpdateCheckResponseHash, payload_id); in TEST_F()
1110 ASSERT_TRUE(DeltaPerformer::CanResumeUpdate(&prefs_, payload_id)); in TEST_F()
1152 TestDeltaPerformer delta_performer{&prefs_, in TEST_F()

12