Home
last modified time | relevance | path

Searched refs:prefs (Results 1 – 25 of 34) sorted by relevance

12

/system/update_engine/
Dcommon_service.cc214 PrefsInterface* prefs = system_state_->prefs(); in SetCohortHint() local
219 if (!prefs->SetString(kPrefsOmahaCohortHint, in_cohort_hint)) { in SetCohortHint()
232 PrefsInterface* prefs = system_state_->prefs(); in GetCohortHint() local
235 if (prefs->Exists(kPrefsOmahaCohortHint) && in GetCohortHint()
236 !prefs->GetString(kPrefsOmahaCohortHint, out_cohort_hint)) { in GetCohortHint()
245 PrefsInterface* prefs = system_state_->prefs(); in SetP2PUpdatePermission() local
247 if (!prefs->SetBoolean(kPrefsP2PEnabled, in_enabled)) { in SetP2PUpdatePermission()
260 PrefsInterface* prefs = system_state_->prefs(); in GetP2PUpdatePermission() local
263 if (prefs->Exists(kPrefsP2PEnabled) && in GetP2PUpdatePermission()
264 !prefs->GetBoolean(kPrefsP2PEnabled, &p2p_pref)) { in GetP2PUpdatePermission()
[all …]
Dmetrics_utils.h78 int64_t GetPersistedValue(const std::string& key, PrefsInterface* prefs);
81 void SetNumReboots(int64_t num_reboots, PrefsInterface* prefs);
85 PrefsInterface* prefs);
88 void SetSystemUpdatedMarker(ClockInterface* clock, PrefsInterface* prefs);
93 PrefsInterface* prefs);
98 PrefsInterface* prefs);
106 PrefsInterface* prefs,
Dmetrics_utils.cc293 if (system_state->prefs()->GetInt64(state_variable_key, &stored_value)) { in WallclockDurationHelper()
304 if (!system_state->prefs()->SetInt64(state_variable_key, in WallclockDurationHelper()
328 int64_t GetPersistedValue(const std::string& key, PrefsInterface* prefs) { in GetPersistedValue() argument
329 CHECK(prefs); in GetPersistedValue()
330 if (!prefs->Exists(key)) in GetPersistedValue()
334 if (!prefs->GetInt64(key, &stored_value)) in GetPersistedValue()
346 void SetNumReboots(int64_t num_reboots, PrefsInterface* prefs) { in SetNumReboots() argument
347 CHECK(prefs); in SetNumReboots()
348 prefs->SetInt64(kPrefsNumReboots, num_reboots); in SetNumReboots()
354 PrefsInterface* prefs) { in SetPayloadAttemptNumber() argument
[all …]
Dpayload_state_unittest.cc111 NiceMock<MockPrefs>* prefs = fake_system_state.mock_prefs(); in TEST() local
112 EXPECT_CALL(*prefs, SetInt64(_, _)).Times(AnyNumber()); in TEST()
113 EXPECT_CALL(*prefs, SetInt64(kPrefsPayloadAttemptNumber, 0)) in TEST()
115 EXPECT_CALL(*prefs, SetInt64(kPrefsFullPayloadAttemptNumber, 0)) in TEST()
117 EXPECT_CALL(*prefs, SetInt64(kPrefsBackoffExpiryTime, 0)).Times(AtLeast(1)); in TEST()
118 EXPECT_CALL(*prefs, SetInt64(kPrefsCurrentUrlIndex, 0)).Times(AtLeast(1)); in TEST()
119 EXPECT_CALL(*prefs, SetInt64(kPrefsCurrentUrlFailureCount, 0)) in TEST()
121 EXPECT_CALL(*prefs, SetInt64(kPrefsUpdateTimestampStart, _)) in TEST()
123 EXPECT_CALL(*prefs, SetInt64(kPrefsUpdateDurationUptime, _)) in TEST()
125 EXPECT_CALL(*prefs, SetInt64(kCurrentBytesDownloadedFromHttps, 0)) in TEST()
[all …]
Domaha_request_action.cc155 PrefsInterface* prefs) { in GetAppBody() argument
185 if (!prefs->GetString(kPrefsPreviousVersion, &prev_version)) { in GetAppBody()
198 LOG_IF(WARNING, !prefs->SetString(kPrefsPreviousVersion, "")) in GetAppBody()
223 string GetCohortArgXml(PrefsInterface* prefs, in GetCohortArgXml() argument
228 if (!prefs->Exists(prefs_key)) in GetCohortArgXml()
231 if (!prefs->GetString(prefs_key, &cohort_value) || cohort_value.empty()) in GetCohortArgXml()
287 system_state->prefs()); in GetAppXml()
323 GetCohortArgXml(system_state->prefs(), "cohort", kPrefsOmahaCohort); in GetAppXml()
325 system_state->prefs(), "cohorthint", kPrefsOmahaCohortHint); in GetAppXml()
327 system_state->prefs(), "cohortname", kPrefsOmahaCohortName); in GetAppXml()
[all …]
Ddaemon_state_android.cc54 Prefs* prefs = new Prefs(); in Initialize() local
55 prefs_.reset(prefs); in Initialize()
56 if (!prefs->Init(non_volatile_path.Append(kPrefsSubDirectory))) { in Initialize()
Dreal_system_state.cc106 Prefs* prefs; in Initialize() local
107 prefs_.reset(prefs = new Prefs()); in Initialize()
108 if (!prefs->Init(non_volatile_path.Append(kPrefsSubDirectory))) { in Initialize()
120 powerwash_safe_prefs_.reset(prefs = new Prefs()); in Initialize()
121 if (!prefs->Init( in Initialize()
Domaha_request_action_unittest.cc1840 NiceMock<MockPrefs> prefs; in TEST_F() local
1841 fake_system_state_.set_prefs(&prefs); in TEST_F()
1843 EXPECT_CALL(prefs, GetString(kPrefsPreviousVersion, _)) in TEST_F()
1847 EXPECT_CALL(prefs, SetString(kPrefsPreviousVersion, _)).Times(0); in TEST_F()
2060 NiceMock<MockPrefs> prefs; in PingTest() local
2061 fake_system_state_.set_prefs(&prefs); in PingTest()
2062 EXPECT_CALL(prefs, GetInt64(kPrefsMetricsCheckLastReportingTime, _)) in PingTest()
2064 EXPECT_CALL(prefs, SetInt64(_, _)).Times(AnyNumber()); in PingTest()
2070 EXPECT_CALL(prefs, GetInt64(kPrefsInstallDateDays, _)) in PingTest()
2072 EXPECT_CALL(prefs, GetInt64(kPrefsLastActivePingDay, _)) in PingTest()
[all …]
Dimage_properties_android.cc209 if (!system_state->prefs()->Exists(current_channel_key) || in LoadImageProperties()
210 !system_state->prefs()->GetString(current_channel_key, &current_channel)) in LoadImageProperties()
224 if (!system_state->prefs()->GetBoolean(kPrefsImgPropPowerwashAllowed, in LoadMutableImageProperties()
236 if (!system_state->prefs()->SetBoolean(kPrefsImgPropPowerwashAllowed, in StoreMutableImageProperties()
Domaha_response_handler_action.cc110 system_state_->prefs(), update_check_response_hash); in PerformAction()
116 !DeltaPerformer::ResetUpdateProgress(system_state_->prefs(), false)) in PerformAction()
119 !system_state_->prefs()->SetString(kPrefsUpdateCheckResponseHash, in PerformAction()
138 system_state_->prefs()->SetString(current_channel_key, in PerformAction()
Dfake_system_state.h75 inline PrefsInterface* prefs() override { return prefs_; } in prefs() function
134 inline void set_prefs(PrefsInterface* prefs) { in set_prefs() argument
135 prefs_ = prefs ? prefs : &mock_prefs_; in set_prefs()
Dimage_properties_android_unittest.cc112 FakePrefs prefs; in TEST_F() local
113 fake_system_state_.set_prefs(&prefs); in TEST_F()
Dcertificate_checker.cc60 CertificateChecker::CertificateChecker(PrefsInterface* prefs, in CertificateChecker() argument
62 : prefs_(prefs), openssl_wrapper_(openssl_wrapper) {} in CertificateChecker()
Dsideload_main.cc153 MemoryPrefs prefs; in ApplyUpdatePayload() local
169 &sideload_daemon_state, &prefs, boot_control.get(), hardware.get()); in ApplyUpdatePayload()
Dsystem_state.h82 virtual PrefsInterface* prefs() = 0;
Dcertificate_checker.h102 CertificateChecker(PrefsInterface* prefs, OpenSSLWrapper* openssl_wrapper);
Dupdate_attempter_android.h54 PrefsInterface* prefs,
/system/update_engine/payload_consumer/
Ddelta_performer.h65 DeltaPerformer(PrefsInterface* prefs, in DeltaPerformer() argument
72 : prefs_(prefs), in DeltaPerformer()
138 static bool CanResumeUpdate(PrefsInterface* prefs,
145 static bool ResetUpdateProgress(PrefsInterface* prefs, bool quick);
Ddownload_action_unittest.cc160 MockPrefs prefs; in TestWithData() local
165 std::make_unique<DownloadAction>(&prefs, in TestWithData()
276 MockPrefs prefs; in TEST() local
281 std::make_unique<DownloadAction>(&prefs, in TEST()
368 MockPrefs prefs; in TestTerminateEarly() local
370 &prefs, in TestTerminateEarly()
479 MockPrefs prefs; in TEST() local
482 std::make_unique<DownloadAction>(&prefs, in TEST()
565 MockPrefs prefs; in StartDownload() local
568 &prefs, in StartDownload()
Ddelta_performer.cc1847 bool DeltaPerformer::CanResumeUpdate(PrefsInterface* prefs, in CanResumeUpdate() argument
1850 if (!(prefs->GetInt64(kPrefsUpdateStateNextOperation, &next_operation) && in CanResumeUpdate()
1855 if (!(prefs->GetString(kPrefsUpdateCheckResponseHash, &interrupted_hash) && in CanResumeUpdate()
1863 if (prefs->GetInt64(kPrefsResumedUpdateFailures, &resumed_update_failures) && in CanResumeUpdate()
1869 if (!(prefs->GetInt64(kPrefsUpdateStateNextDataOffset, &next_data_offset) && in CanResumeUpdate()
1874 if (!(prefs->GetString(kPrefsUpdateStateSHA256Context, &sha256_context) && in CanResumeUpdate()
1879 if (!(prefs->GetInt64(kPrefsManifestMetadataSize, &manifest_metadata_size) && in CanResumeUpdate()
1884 if (!(prefs->GetInt64(kPrefsManifestSignatureSize, in CanResumeUpdate()
1892 bool DeltaPerformer::ResetUpdateProgress(PrefsInterface* prefs, bool quick) { in ResetUpdateProgress() argument
1893 TEST_AND_RETURN_FALSE(prefs->SetInt64(kPrefsUpdateStateNextOperation, in ResetUpdateProgress()
[all …]
Ddelta_performer_integration_test.cc672 MockPrefs prefs; in ApplyDeltaFile() local
673 EXPECT_CALL(prefs, SetInt64(kPrefsManifestMetadataSize, state->metadata_size)) in ApplyDeltaFile()
675 EXPECT_CALL(prefs, SetInt64(kPrefsManifestSignatureSize, 0)) in ApplyDeltaFile()
677 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextOperation, _)) in ApplyDeltaFile()
679 EXPECT_CALL(prefs, GetInt64(kPrefsUpdateStateNextOperation, _)) in ApplyDeltaFile()
681 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextDataOffset, _)) in ApplyDeltaFile()
683 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextDataLength, _)) in ApplyDeltaFile()
685 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSHA256Context, _)) in ApplyDeltaFile()
687 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSignedSHA256Context, _)) in ApplyDeltaFile()
689 EXPECT_CALL(prefs, SetBoolean(kPrefsDynamicPartitionMetadataUpdated, _)) in ApplyDeltaFile()
[all …]
Ddownload_action.h76 DownloadAction(PrefsInterface* prefs,
/system/update_engine/update_manager/
Dstaging_utils.cc102 PrefsInterface* prefs, in CalculateStagingCase() argument
132 if (prefs->GetInt64(kPrefsWallClockStagingWaitPeriod, &wait_period_in_days) && in CalculateStagingCase()
Dstaging_utils.h65 chromeos_update_engine::PrefsInterface* prefs,
Dreal_updater_provider.cc308 chromeos_update_engine::PrefsInterface* prefs, in BooleanPrefVariable() argument
312 prefs_(prefs), in BooleanPrefVariable()
315 prefs->AddObserver(key, this); in BooleanPrefVariable()
460 system_state_->prefs(), in RealUpdaterProvider()
465 system_state_->prefs(), in RealUpdaterProvider()

12