Home
last modified time | relevance | path

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

12

/aosp12/system/update_engine/common/
H A Dprefs_unittest.cc149 common_prefs_ = &prefs_; in SetUp()
160 Prefs prefs_; member in chromeos_update_engine::PrefsTest
253 EXPECT_TRUE(prefs_.Init(subdir)); in TEST_F()
439 prefs_.Init(prefs_dir_); in TEST_F()
520 prefs_.SetString(kKey, "value"); in TEST_F()
525 prefs_.Delete(kKey); in TEST_F()
533 prefs_.SetString(key1, "value"); in TEST_F()
538 prefs_.Delete(key1); in TEST_F()
551 prefs_.SetString(kKey, "value"); in TEST_F()
552 prefs_.Delete(kKey); in TEST_F()
[all …]
H A Ddownload_action.h124 PrefsInterface* prefs_; variable
/aosp12/system/update_engine/aosp/
H A Dupdate_attempter_android_unittest.cc68 FakePrefs prefs_; member in chromeos_update_engine::UpdateAttempterAndroidTest
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()
99 ASSERT_TRUE(prefs_.Exists(kPrefsNumReboots)); in TEST_F()
107 prefs_.SetInt64(kPrefsPayloadAttemptNumber, 1); in TEST_F()
122 EXPECT_FALSE(prefs_.Exists(kPrefsNumReboots)); in TEST_F()
130 prefs_.SetInt64(kPrefsNumReboots, 3); in TEST_F()
131 prefs_.SetInt64(kPrefsPayloadAttemptNumber, 2); in TEST_F()
[all …]
H A Dupdate_attempter_android.cc138 prefs_(prefs), in UpdateAttempterAndroid()
234 prefs_, in ApplyPayload()
648 prefs_->SetInt64(kPrefsTotalBytesDownloaded, in BytesReceived()
724 prefs_->Delete(kPrefsPayloadAttemptNumber); in TerminateUpdateAndNotify()
757 std::make_unique<DownloadAction>(prefs_, in BuildUpdateActions()
897 if (!prefs_->Exists(kPrefsPreviousVersion)) { in UpdatePrefsAndReportUpdateMetricsOnReboot()
954 metrics_utils::SetNumReboots(0, prefs_); in UpdatePrefsOnUpdateStart()
966 CHECK(prefs_); in ClearMetricsPrefs()
968 prefs_->Delete(kPrefsNumReboots); in ClearMetricsPrefs()
969 prefs_->Delete(kPrefsSystemUpdatedMarker); in ClearMetricsPrefs()
[all …]
H A 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()
H A 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()
H A Ddaemon_state_android.h63 std::unique_ptr<PrefsInterface> prefs_; variable
H A Dcleanup_previous_update_action.h70 PrefsInterface* prefs_;
H A Dupdate_attempter_android.h206 PrefsInterface* prefs_; variable
/aosp12/system/update_engine/cros/
H A Dpayload_state.cc63 : prefs_(nullptr), in PayloadState()
82 prefs_ = SystemState::Get()->prefs(); in Initialize()
428 !prefs_->Exists(kPrefsNoIgnoreBackoff)) { in ShouldBackoffDownload()
711 prefs_->Delete(kPrefsAttemptInProgress); in ClearPersistedAttemptMetrics()
775 prefs_->Delete(kPrefsUpdateTimestampStart); in CollectAndReportSuccessfulUpdateMetrics()
776 prefs_->Delete(kPrefsUpdateDurationUptime); in CollectAndReportSuccessfulUpdateMetrics()
1004 if (!prefs_->Exists(kPrefsBackoffExpiryTime)) in LoadBackoffExpiryTime()
1024 prefs_->SetInt64(kPrefsBackoffExpiryTime, in SetBackoffExpiryTime()
1151 prefs_->SetInt64(kPrefsUpdateDurationUptime, in SetUpdateDurationUptimeExtended()
1274 prefs_, in UpdateEngineStarted()
[all …]
H A Dupdate_attempter.cc151 prefs_ = SystemState::Get()->prefs(); in Init()
555 prefs_->Delete(kPrefsUpdateCheckCount); in CalculateScatteringParams()
625 if (!prefs_->Delete(key)) in ResetDlcPrefs()
641 prefs_->SetString(pref_key, pref_value); in SetPref()
645 prefs_->SetString(key, pref_value); in SetPref()
770 prefs_, in BuildUpdateActions()
1129 prefs_->SetString(kPrefsPreviousVersion, in ProcessingDoneInternal()
1144 prefs_->Delete(kPrefsUpdateCheckCount); in ProcessingDoneInternal()
1147 prefs_->Delete(kPrefsUpdateFirstSeenAt); in ProcessingDoneInternal()
1700 prefs_->Delete(kPrefsUpdateCheckCount); in DecrementUpdateCheckCount()
[all …]
H A 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()
H A 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()
H A 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
H A Dreal_system_state.h85 PrefsInterface* prefs() override { return prefs_.get(); } in prefs()
148 std::unique_ptr<PrefsInterface> prefs_; variable
H A 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
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()
679 EXPECT_TRUE(prefs_->SetInt64(kPrefsDeltaUpdateFailures, in TEST_F()
1255 EXPECT_FALSE(prefs_->Exists(kPrefsUpdateCheckCount)); in CheckStagingOff()
[all …]
H A Dfake_system_state.cc29 prefs_(&fake_prefs_), in FakeSystemState()
H A Ddownload_action_chromeos.h119 PrefsInterface* prefs_; variable
/aosp12/system/update_engine/
H A 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()
H A 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()
H A 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()
H A Dcertificate_checker.h162 PrefsInterface* prefs_; variable
/aosp12/system/update_engine/payload_consumer/
H A 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()
1451 prefs_->SetInt64(kPrefsUpdateStateNextDataLength, 0)); in CheckpointUpdateProgress()
[all …]
H A Ddelta_performer.h75 : prefs_(prefs), in DeltaPerformer()
331 PrefsInterface* prefs_; variable
H A 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