Home
last modified time | relevance | path

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

/system/update_engine/common/
Dprefs_unittest.cc46 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/
Dpayload_state.cc55 : 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 …]
Dcertificate_checker_unittest.cc61 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()
Dupdate_attempter_android.cc85 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 …]
Dupdate_attempter.cc151 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 …]
Dcertificate_checker.cc62 : 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()
Ddaemon_state_android.cc55 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()
Dreal_system_state.cc88 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()
Dfake_system_state.h74 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
Dupdate_attempter_unittest.cc145 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 …]
Dreal_system_state.h98 inline PrefsInterface* prefs() override { return prefs_.get(); } in prefs()
161 std::unique_ptr<PrefsInterface> prefs_; variable
Dfake_system_state.cc31 prefs_(&mock_prefs_), in FakeSystemState()
Ddaemon_state_android.h63 std::unique_ptr<PrefsInterface> prefs_; variable
Dcertificate_checker.h162 PrefsInterface* prefs_; variable
Dupdate_attempter_android.h128 PrefsInterface* prefs_; variable
Dupdate_attempter.h436 PrefsInterface* prefs_ = nullptr; variable
Dpayload_state.h428 PrefsInterface* prefs_; variable
/system/update_engine/update_manager/
Dreal_updater_provider.cc310 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/
Ddelta_performer.cc627 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 …]
Ddelta_performer.h82 : prefs_(prefs), in DeltaPerformer()
299 PrefsInterface* prefs_; variable
Ddownload_action.cc46 : prefs_(prefs), in DownloadAction()
189 prefs_, boot_control_, hardware_, delegate_, &install_plan_)); in PerformAction()
Ddownload_action.h138 PrefsInterface* prefs_; variable
Ddelta_performer_unittest.cc330 FakePrefs prefs_; member in chromeos_update_engine::DeltaPerformerTest
336 &prefs_, &fake_boot_control_, &fake_hardware_, &mock_delegate_, &install_plan_};