Home
last modified time | relevance | path

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

12

/system/update_engine/
Dcommon_service.cc200 PrefsInterface* prefs = system_state_->prefs(); in SetCohortHint() local
205 if (!prefs->SetString(kPrefsOmahaCohortHint, in_cohort_hint)) { in SetCohortHint()
218 PrefsInterface* prefs = system_state_->prefs(); in GetCohortHint() local
221 if (prefs->Exists(kPrefsOmahaCohortHint) && in GetCohortHint()
222 !prefs->GetString(kPrefsOmahaCohortHint, out_cohort_hint)) { in GetCohortHint()
231 PrefsInterface* prefs = system_state_->prefs(); in SetP2PUpdatePermission() local
233 if (!prefs->SetBoolean(kPrefsP2PEnabled, in_enabled)) { in SetP2PUpdatePermission()
246 PrefsInterface* prefs = system_state_->prefs(); in GetP2PUpdatePermission() local
249 if (prefs->Exists(kPrefsP2PEnabled) && in GetP2PUpdatePermission()
250 !prefs->GetBoolean(kPrefsP2PEnabled, &p2p_pref)) { in GetP2PUpdatePermission()
[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 …]
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);
92 PrefsInterface* prefs);
100 PrefsInterface* prefs,
Dmetrics_utils.cc280 if (system_state->prefs()->GetInt64(state_variable_key, &stored_value)) { in WallclockDurationHelper()
291 if (!system_state->prefs()->SetInt64(state_variable_key, in WallclockDurationHelper()
315 int64_t GetPersistedValue(const std::string& key, PrefsInterface* prefs) { in GetPersistedValue() argument
316 CHECK(prefs); in GetPersistedValue()
317 if (!prefs->Exists(key)) in GetPersistedValue()
321 if (!prefs->GetInt64(key, &stored_value)) in GetPersistedValue()
333 void SetNumReboots(int64_t num_reboots, PrefsInterface* prefs) { in SetNumReboots() argument
334 CHECK(prefs); in SetNumReboots()
335 prefs->SetInt64(kPrefsNumReboots, num_reboots); in SetNumReboots()
341 PrefsInterface* prefs) { in SetPayloadAttemptNumber() argument
[all …]
Domaha_request_action.cc122 PrefsInterface* prefs) { in GetAppBody() argument
142 if (!prefs->GetString(kPrefsPreviousVersion, &prev_version)) { in GetAppBody()
155 LOG_IF(WARNING, !prefs->SetString(kPrefsPreviousVersion, "")) in GetAppBody()
178 string GetCohortArgXml(PrefsInterface* prefs, in GetCohortArgXml() argument
183 if (!prefs->Exists(prefs_key)) in GetCohortArgXml()
186 if (!prefs->GetString(prefs_key, &cohort_value) || cohort_value.empty()) in GetCohortArgXml()
236 system_state->prefs()); in GetAppXml()
271 app_cohort_args += GetCohortArgXml(system_state->prefs(), in GetAppXml()
273 app_cohort_args += GetCohortArgXml(system_state->prefs(), in GetAppXml()
275 app_cohort_args += GetCohortArgXml(system_state->prefs(), 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()
Domaha_request_action_unittest.cc1534 NiceMock<MockPrefs> prefs; in TEST_F() local
1535 fake_system_state_.set_prefs(&prefs); in TEST_F()
1537 EXPECT_CALL(prefs, GetString(kPrefsPreviousVersion, _)) in TEST_F()
1541 EXPECT_CALL(prefs, SetString(kPrefsPreviousVersion, _)).Times(0); in TEST_F()
1733 NiceMock<MockPrefs> prefs; in PingTest() local
1734 fake_system_state_.set_prefs(&prefs); in PingTest()
1735 EXPECT_CALL(prefs, GetInt64(kPrefsMetricsCheckLastReportingTime, _)) in PingTest()
1737 EXPECT_CALL(prefs, SetInt64(_, _)).Times(AnyNumber()); in PingTest()
1743 EXPECT_CALL(prefs, GetInt64(kPrefsInstallDateDays, _)) in PingTest()
1745 EXPECT_CALL(prefs, GetInt64(kPrefsLastActivePingDay, _)) in PingTest()
[all …]
Dreal_system_state.cc97 Prefs* prefs; in Initialize() local
98 prefs_.reset(prefs = new Prefs()); in Initialize()
99 if (!prefs->Init(non_volatile_path.Append(kPrefsSubDirectory))) { in Initialize()
111 powerwash_safe_prefs_.reset(prefs = new Prefs()); in Initialize()
112 if (!prefs->Init( in Initialize()
Dconnection_manager.cc87 PrefsInterface* prefs = system_state_->prefs(); in IsUpdateAllowedOver() local
89 if (!prefs || !prefs->Exists(kPrefsUpdateOverCellularPermission)) { in IsUpdateAllowedOver()
96 if (!prefs->GetBoolean(kPrefsUpdateOverCellularPermission, in IsUpdateAllowedOver()
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()
139 system_state_->prefs()->SetString(current_channel_key, in PerformAction()
Dfake_system_state.h75 inline PrefsInterface* prefs() override { return prefs_; } in prefs() function
132 inline void set_prefs(PrefsInterface* prefs) { in set_prefs() argument
133 prefs_ = prefs ? prefs : &mock_prefs_; in set_prefs()
Dimage_properties_android.cc205 if (!system_state->prefs()->Exists(current_channel_key) || in LoadImageProperties()
206 !system_state->prefs()->GetString(current_channel_key, &current_channel)) in LoadImageProperties()
220 if (!system_state->prefs()->GetBoolean(kPrefsImgPropPowerwashAllowed, in LoadMutableImageProperties()
232 if (!system_state->prefs()->SetBoolean(kPrefsImgPropPowerwashAllowed, in StoreMutableImageProperties()
Dconnection_manager_unittest.cc334 testing::NiceMock<MockPrefs>* prefs = fake_system_state_.mock_prefs(); in TEST_F() local
344 EXPECT_CALL(*prefs, Exists(kPrefsUpdateOverCellularPermission)) in TEST_F()
351 EXPECT_CALL(*prefs, Exists(kPrefsUpdateOverCellularPermission)) in TEST_F()
354 EXPECT_CALL(*prefs, GetBoolean(kPrefsUpdateOverCellularPermission, _)) in TEST_F()
361 EXPECT_CALL(*prefs, Exists(kPrefsUpdateOverCellularPermission)) in TEST_F()
364 EXPECT_CALL(*prefs, GetBoolean(kPrefsUpdateOverCellularPermission, _)) in TEST_F()
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.cc158 MemoryPrefs prefs; in ApplyUpdatePayload() local
174 &sideload_daemon_state, &prefs, boot_control.get(), hardware.get()); in ApplyUpdatePayload()
Dsystem_state.h81 virtual PrefsInterface* prefs() = 0;
Dcertificate_checker.h102 CertificateChecker(PrefsInterface* prefs, OpenSSLWrapper* openssl_wrapper);
Dreal_system_state.h99 inline PrefsInterface* prefs() override { return prefs_.get(); } in prefs() function
/system/update_engine/payload_consumer/
Ddelta_performer.h67 DeltaPerformer(PrefsInterface* prefs, in DeltaPerformer() argument
74 : prefs_(prefs), in DeltaPerformer()
136 static bool CanResumeUpdate(PrefsInterface* prefs,
143 static bool ResetUpdateProgress(PrefsInterface* prefs, bool quick);
Ddownload_action_unittest.cc159 MockPrefs prefs; in TestWithData() local
164 DownloadAction download_action(&prefs, in TestWithData()
274 MockPrefs prefs; in TEST() local
278 DownloadAction download_action(&prefs, in TEST()
366 MockPrefs prefs; in TestTerminateEarly() local
368 &prefs, in TestTerminateEarly()
468 MockPrefs prefs; in TEST() local
470 DownloadAction download_action(&prefs, in TEST()
555 MockPrefs prefs; in StartDownload() local
560 download_action_.reset(new DownloadAction(&prefs, in StartDownload()
Ddelta_performer.cc1614 bool DeltaPerformer::CanResumeUpdate(PrefsInterface* prefs, in CanResumeUpdate() argument
1617 if (!(prefs->GetInt64(kPrefsUpdateStateNextOperation, &next_operation) && in CanResumeUpdate()
1623 if (!(prefs->GetString(kPrefsUpdateCheckResponseHash, &interrupted_hash) && in CanResumeUpdate()
1631 if (prefs->GetInt64(kPrefsResumedUpdateFailures, &resumed_update_failures) && in CanResumeUpdate()
1637 if (!(prefs->GetInt64(kPrefsUpdateStateNextDataOffset, &next_data_offset) && in CanResumeUpdate()
1642 if (!(prefs->GetString(kPrefsUpdateStateSHA256Context, &sha256_context) && in CanResumeUpdate()
1647 if (!(prefs->GetInt64(kPrefsManifestMetadataSize, &manifest_metadata_size) && in CanResumeUpdate()
1652 if (!(prefs->GetInt64(kPrefsManifestSignatureSize, in CanResumeUpdate()
1660 bool DeltaPerformer::ResetUpdateProgress(PrefsInterface* prefs, bool quick) { in ResetUpdateProgress() argument
1661 TEST_AND_RETURN_FALSE(prefs->SetInt64(kPrefsUpdateStateNextOperation, in ResetUpdateProgress()
[all …]
Ddelta_performer_integration_test.cc695 MockPrefs prefs; in ApplyDeltaFile() local
696 EXPECT_CALL(prefs, SetInt64(kPrefsManifestMetadataSize, in ApplyDeltaFile()
698 EXPECT_CALL(prefs, SetInt64(kPrefsManifestSignatureSize, 0)) in ApplyDeltaFile()
700 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextOperation, _)) in ApplyDeltaFile()
702 EXPECT_CALL(prefs, GetInt64(kPrefsUpdateStateNextOperation, _)) in ApplyDeltaFile()
704 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextDataOffset, _)) in ApplyDeltaFile()
706 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextDataLength, _)) in ApplyDeltaFile()
708 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSHA256Context, _)) in ApplyDeltaFile()
710 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSignedSHA256Context, _)) in ApplyDeltaFile()
713 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSignatureBlob, _)) in ApplyDeltaFile()
[all …]
Ddownload_action.h77 DownloadAction(PrefsInterface* prefs,
/system/update_engine/update_manager/
Dreal_updater_provider.cc309 chromeos_update_engine::PrefsInterface* prefs, in BooleanPrefVariable() argument
313 prefs_(prefs), in BooleanPrefVariable()
316 prefs->AddObserver(key, this); in BooleanPrefVariable()
465 system_state_->prefs(), in RealUpdaterProvider()
470 system_state_->prefs(), in RealUpdaterProvider()

12