Home
last modified time | relevance | path

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

123

/system/update_engine/
Dcommon_service.cc220 PrefsInterface* prefs = system_state_->prefs(); in SetCohortHint() local
225 if (!prefs->SetString(kPrefsOmahaCohortHint, in_cohort_hint)) { in SetCohortHint()
238 PrefsInterface* prefs = system_state_->prefs(); in GetCohortHint() local
241 if (prefs->Exists(kPrefsOmahaCohortHint) && in GetCohortHint()
242 !prefs->GetString(kPrefsOmahaCohortHint, out_cohort_hint)) { in GetCohortHint()
251 PrefsInterface* prefs = system_state_->prefs(); in SetP2PUpdatePermission() local
253 if (!prefs->SetBoolean(kPrefsP2PEnabled, in_enabled)) { in SetP2PUpdatePermission()
266 PrefsInterface* prefs = system_state_->prefs(); in GetP2PUpdatePermission() local
269 if (prefs->Exists(kPrefsP2PEnabled) && in GetP2PUpdatePermission()
270 !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.cc301 if (system_state->prefs()->GetInt64(state_variable_key, &stored_value)) { in WallclockDurationHelper()
312 if (!system_state->prefs()->SetInt64(state_variable_key, in WallclockDurationHelper()
336 int64_t GetPersistedValue(const std::string& key, PrefsInterface* prefs) { in GetPersistedValue() argument
337 CHECK(prefs); in GetPersistedValue()
338 if (!prefs->Exists(key)) in GetPersistedValue()
342 if (!prefs->GetInt64(key, &stored_value)) in GetPersistedValue()
354 void SetNumReboots(int64_t num_reboots, PrefsInterface* prefs) { in SetNumReboots() argument
355 CHECK(prefs); in SetNumReboots()
356 prefs->SetInt64(kPrefsNumReboots, num_reboots); in SetNumReboots()
362 PrefsInterface* prefs) { in SetPayloadAttemptNumber() argument
[all …]
Dpayload_state_unittest.cc114 NiceMock<MockPrefs>* prefs = fake_system_state.mock_prefs(); in TEST() local
115 EXPECT_CALL(*prefs, SetInt64(_, _)).Times(AnyNumber()); in TEST()
116 EXPECT_CALL(*prefs, SetInt64(kPrefsPayloadAttemptNumber, 0)) in TEST()
118 EXPECT_CALL(*prefs, SetInt64(kPrefsFullPayloadAttemptNumber, 0)) in TEST()
120 EXPECT_CALL(*prefs, SetInt64(kPrefsBackoffExpiryTime, 0)).Times(AtLeast(1)); in TEST()
121 EXPECT_CALL(*prefs, SetInt64(kPrefsCurrentUrlIndex, 0)).Times(AtLeast(1)); in TEST()
122 EXPECT_CALL(*prefs, SetInt64(kPrefsCurrentUrlFailureCount, 0)) in TEST()
124 EXPECT_CALL(*prefs, SetInt64(kPrefsUpdateTimestampStart, _)) in TEST()
126 EXPECT_CALL(*prefs, SetInt64(kPrefsUpdateDurationUptime, _)) in TEST()
128 EXPECT_CALL(*prefs, SetInt64(kCurrentBytesDownloadedFromHttps, 0)) in TEST()
[all …]
Dexcluder_chromeos.cc36 std::unique_ptr<ExcluderInterface> CreateExcluder(PrefsInterface* prefs) { in CreateExcluder() argument
37 return std::make_unique<ExcluderChromeOS>(prefs); in CreateExcluder()
40 ExcluderChromeOS::ExcluderChromeOS(PrefsInterface* prefs) : prefs_(prefs) {} in ExcluderChromeOS() argument
Domaha_request_action.cc298 if (system_state_->prefs()->GetInt64(key, &last_ping) && last_ping >= 0) { in CalculatePingDays()
347 PrefsInterface* prefs = system_state->prefs(); in GetInstallDate() local
348 if (prefs == nullptr) in GetInstallDate()
353 if (prefs->GetInt64(kPrefsInstallDateDays, &stored_value)) { in GetInstallDate()
360 prefs->Delete(kPrefsInstallDateDays); in GetInstallDate()
422 PrefsInterface* prefs = system_state_->prefs(); in StorePingReply() local
425 prefs->CreateSubKey({kDlcPrefsSubDir, dlc_id, kPrefsPingActive}); in StorePingReply()
426 if (!prefs->SetInt64(active_key, kPingInactiveValue)) in StorePingReply()
431 prefs->CreateSubKey({kDlcPrefsSubDir, dlc_id, kPrefsPingLastRollcall}); in StorePingReply()
432 if (!prefs->SetString(last_rollcall_key, parser_data.daystart_elapsed_days)) in StorePingReply()
[all …]
Domaha_request_builder_xml_unittest.cc100 fake_system_state_.prefs(), in TEST_F()
126 fake_system_state_.prefs(), in TEST_F()
149 fake_system_state_.prefs(), in TEST_F()
170 fake_system_state_.prefs(), in TEST_F()
192 fake_system_state_.prefs(), in TEST_F()
211 fake_system_state_.prefs(), in TEST_F()
232 fake_system_state_.prefs(), in TEST_F()
268 fake_system_state_.prefs(), in TEST_F()
290 fake_system_state_.prefs(), in TEST_F()
314 fake_system_state_.prefs(), in TEST_F()
Ddaemon_state_android.cc53 Prefs* prefs = new Prefs(); in Initialize() local
54 prefs_.reset(prefs); in Initialize()
55 if (!prefs->Init(non_volatile_path.Append(kPrefsSubDirectory))) { in Initialize()
Dreal_system_state.cc104 Prefs* prefs; in Initialize() local
105 prefs_.reset(prefs = new Prefs()); in Initialize()
106 if (!prefs->Init(non_volatile_path.Append(kPrefsSubDirectory))) { in Initialize()
118 powerwash_safe_prefs_.reset(prefs = new Prefs()); in Initialize()
119 if (!prefs->Init( in Initialize()
Domaha_request_action_unittest.cc1584 NiceMock<MockPrefs> prefs; in TEST_F() local
1585 fake_system_state_.set_prefs(&prefs); in TEST_F()
1591 EXPECT_CALL(prefs, GetString(kPrefsPreviousVersion, _)) in TEST_F()
1595 EXPECT_CALL(prefs, SetString(kPrefsPreviousVersion, _)).Times(0); in TEST_F()
1805 NiceMock<MockPrefs> prefs; in PingTest() local
1806 fake_system_state_.set_prefs(&prefs); in PingTest()
1807 EXPECT_CALL(prefs, GetInt64(kPrefsMetricsCheckLastReportingTime, _)) in PingTest()
1809 EXPECT_CALL(prefs, SetInt64(_, _)).Times(AnyNumber()); in PingTest()
1815 EXPECT_CALL(prefs, GetInt64(kPrefsInstallDateDays, _)) in PingTest()
1817 EXPECT_CALL(prefs, GetInt64(kPrefsLastActivePingDay, _)) in PingTest()
[all …]
Dupdate_attempter.cc149 prefs_ = system_state_->prefs(); in Init()
189 if (system_state_->prefs()->Exists(kPrefsDailyMetricsLastReportedAt) && in CheckAndReportDailyMetrics()
190 system_state_->prefs()->GetInt64(kPrefsDailyMetricsLastReportedAt, in CheckAndReportDailyMetrics()
214 system_state_->prefs()->SetInt64(kPrefsDailyMetricsLastReportedAt, in CheckAndReportDailyMetrics()
664 PrefsInterface* prefs = system_state_->prefs(); in ResetDlcPrefs() local
667 auto key = prefs->CreateSubKey({kDlcPrefsSubDir, dlc_id, sub_key}); in ResetDlcPrefs()
668 if (!prefs->Delete(key)) in ResetDlcPrefs()
685 PrefsInterface* prefs = system_state_->prefs(); in SetDlcActiveValue() local
688 prefs->CreateSubKey({kDlcPrefsSubDir, dlc_id, kPrefsPingActive}); in SetDlcActiveValue()
689 if (!prefs->SetInt64(ping_active_key, kPingActiveValue)) { in SetDlcActiveValue()
[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()
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()
Domaha_response_handler_action.cc116 system_state_->prefs(), update_check_response_hash); in PerformAction()
122 !DeltaPerformer::ResetUpdateProgress(system_state_->prefs(), false)) in PerformAction()
125 !system_state_->prefs()->SetString(kPrefsUpdateCheckResponseHash, in PerformAction()
144 system_state_->prefs()->SetString(current_channel_key, in PerformAction()
Dimage_properties_android_unittest.cc112 FakePrefs prefs; in TEST_F() local
113 fake_system_state_.set_prefs(&prefs); in TEST_F()
/system/update_engine/payload_consumer/
Ddelta_performer.h68 DeltaPerformer(PrefsInterface* prefs, in DeltaPerformer() argument
75 : prefs_(prefs), in DeltaPerformer()
143 static bool CanResumeUpdate(PrefsInterface* prefs,
153 PrefsInterface* prefs,
200 PrefsInterface* prefs,
Ddelta_performer_fuzzer.cc48 MemoryPrefs prefs; in FuzzDeltaPerformer() local
75 DeltaPerformer performer(&prefs, in FuzzDeltaPerformer()
Ddelta_performer.cc941 PrefsInterface* prefs, in PreparePartitionsForUpdate() argument
949 prefs->GetString(kPrefsDynamicPartitionMetadataUpdated, &last_hash)); in PreparePartitionsForUpdate()
973 TEST_AND_RETURN_FALSE(prefs->SetString(kPrefsDynamicPartitionMetadataUpdated, in PreparePartitionsForUpdate()
1781 bool DeltaPerformer::CanResumeUpdate(PrefsInterface* prefs, in CanResumeUpdate() argument
1784 if (!(prefs->GetInt64(kPrefsUpdateStateNextOperation, &next_operation) && in CanResumeUpdate()
1789 if (!(prefs->GetString(kPrefsUpdateCheckResponseHash, &interrupted_hash) && in CanResumeUpdate()
1797 if (prefs->GetInt64(kPrefsResumedUpdateFailures, &resumed_update_failures) && in CanResumeUpdate()
1803 if (!(prefs->GetInt64(kPrefsUpdateStateNextDataOffset, &next_data_offset) && in CanResumeUpdate()
1808 if (!(prefs->GetString(kPrefsUpdateStateSHA256Context, &sha256_context) && in CanResumeUpdate()
1813 if (!(prefs->GetInt64(kPrefsManifestMetadataSize, &manifest_metadata_size) && in CanResumeUpdate()
[all …]
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()
/system/update_engine/common/
Ddynamic_partition_control_stub.h47 PrefsInterface* prefs,
49 bool ResetUpdate(PrefsInterface* prefs) override;
Ddynamic_partition_control_stub.cc61 PrefsInterface* prefs, in GetCleanupPreviousUpdateAction() argument
66 bool DynamicPartitionControlStub::ResetUpdate(PrefsInterface* prefs) { in ResetUpdate() argument
Ddynamic_partition_control_interface.h107 PrefsInterface* prefs,
121 virtual bool ResetUpdate(PrefsInterface* prefs) = 0;
Dexcluder_stub.cc27 std::unique_ptr<ExcluderInterface> CreateExcluder(PrefsInterface* prefs) { in CreateExcluder() argument
/system/update_engine/update_manager/
Dstaging_utils.cc101 PrefsInterface* prefs, in CalculateStagingCase() argument
131 if (prefs->GetInt64(kPrefsWallClockStagingWaitPeriod, &wait_period_in_days) && in CalculateStagingCase()
Dstaging_utils.h65 chromeos_update_engine::PrefsInterface* prefs,

123