Home
last modified time | relevance | path

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

12

/system/update_engine/
Dimage_properties_android.cc79 if (!system_state->prefs()->Exists(current_channel_key) || in LoadImageProperties()
80 !system_state->prefs()->GetString(current_channel_key, &current_channel)) in LoadImageProperties()
92 PrefsInterface* const prefs = system_state->prefs(); in LoadMutableImageProperties() local
93 if (!prefs->GetString(kPrefsImgPropChannelName, &result.target_channel)) in LoadMutableImageProperties()
95 if (!prefs->GetBoolean(kPrefsImgPropPowerwashAllowed, in LoadMutableImageProperties()
104 PrefsInterface* const prefs = system_state->prefs(); in StoreMutableImageProperties() local
106 prefs->SetString(kPrefsImgPropChannelName, properties.target_channel) && in StoreMutableImageProperties()
107 prefs->SetBoolean(kPrefsImgPropPowerwashAllowed, in StoreMutableImageProperties()
Dpayload_state_unittest.cc107 NiceMock<MockPrefs>* prefs = fake_system_state.mock_prefs(); in TEST() local
108 EXPECT_CALL(*prefs, SetInt64(_, _)).Times(AnyNumber()); in TEST()
109 EXPECT_CALL(*prefs, SetInt64(kPrefsPayloadAttemptNumber, 0)) in TEST()
111 EXPECT_CALL(*prefs, SetInt64(kPrefsFullPayloadAttemptNumber, 0)) in TEST()
113 EXPECT_CALL(*prefs, SetInt64(kPrefsBackoffExpiryTime, 0)).Times(AtLeast(1)); in TEST()
114 EXPECT_CALL(*prefs, SetInt64(kPrefsCurrentUrlIndex, 0)).Times(AtLeast(1)); in TEST()
115 EXPECT_CALL(*prefs, SetInt64(kPrefsCurrentUrlFailureCount, 0)) in TEST()
117 EXPECT_CALL(*prefs, SetInt64(kPrefsUpdateTimestampStart, _)) in TEST()
119 EXPECT_CALL(*prefs, SetInt64(kPrefsUpdateDurationUptime, _)) in TEST()
121 EXPECT_CALL(*prefs, SetInt64(kCurrentBytesDownloadedFromHttps, 0)) in TEST()
[all …]
Domaha_request_action.cc112 PrefsInterface* prefs) { in GetAppBody() argument
132 if (!prefs->GetString(kPrefsPreviousVersion, &prev_version)) { in GetAppBody()
145 LOG_IF(WARNING, !prefs->SetString(kPrefsPreviousVersion, "")) in GetAppBody()
168 string GetCohortArgXml(PrefsInterface* prefs, in GetCohortArgXml() argument
173 if (!prefs->Exists(prefs_key)) in GetCohortArgXml()
176 if (!prefs->GetString(prefs_key, &cohort_value) || cohort_value.empty()) in GetCohortArgXml()
211 system_state->prefs()); in GetAppXml()
246 app_cohort_args += GetCohortArgXml(system_state->prefs(), in GetAppXml()
248 app_cohort_args += GetCohortArgXml(system_state->prefs(), in GetAppXml()
250 app_cohort_args += GetCohortArgXml(system_state->prefs(), in GetAppXml()
[all …]
Dcommon_service.cc191 PrefsInterface* prefs = system_state_->prefs(); in SetP2PUpdatePermission() local
193 if (!prefs->SetBoolean(kPrefsP2PEnabled, in_enabled)) { in SetP2PUpdatePermission()
206 PrefsInterface* prefs = system_state_->prefs(); in GetP2PUpdatePermission() local
209 if (prefs->Exists(kPrefsP2PEnabled) && in GetP2PUpdatePermission()
210 !prefs->GetBoolean(kPrefsP2PEnabled, &p2p_pref)) { in GetP2PUpdatePermission()
247 PrefsInterface* prefs = system_state_->prefs(); in SetUpdateOverCellularPermission() local
249 if (!prefs->SetBoolean(kPrefsUpdateOverCellularPermission, in_allowed)) { in SetUpdateOverCellularPermission()
Domaha_request_action_unittest.cc1155 NiceMock<MockPrefs> prefs; in TEST_F() local
1156 fake_system_state_.set_prefs(&prefs); in TEST_F()
1158 EXPECT_CALL(prefs, GetString(kPrefsPreviousVersion, _)) in TEST_F()
1162 EXPECT_CALL(prefs, SetString(kPrefsPreviousVersion, _)).Times(0); in TEST_F()
1356 NiceMock<MockPrefs> prefs; in PingTest() local
1357 fake_system_state_.set_prefs(&prefs); in PingTest()
1358 EXPECT_CALL(prefs, GetInt64(kPrefsMetricsCheckLastReportingTime, _)) in PingTest()
1360 EXPECT_CALL(prefs, SetInt64(_, _)).Times(AnyNumber()); in PingTest()
1366 EXPECT_CALL(prefs, GetInt64(kPrefsInstallDateDays, _)) in PingTest()
1368 EXPECT_CALL(prefs, GetInt64(kPrefsLastActivePingDay, _)) in PingTest()
[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.cc87 Prefs* prefs; in Initialize() local
88 prefs_.reset(prefs = new Prefs()); in Initialize()
89 if (!prefs->Init(non_volatile_path.Append(kPrefsSubDirectory))) { in Initialize()
101 powerwash_safe_prefs_.reset(prefs = new Prefs()); in Initialize()
102 if (!prefs->Init( in Initialize()
Dconnection_manager.cc108 PrefsInterface* prefs = system_state_->prefs(); in IsUpdateAllowedOver() local
110 if (!prefs || !prefs->Exists(kPrefsUpdateOverCellularPermission)) { in IsUpdateAllowedOver()
117 if (!prefs->GetBoolean(kPrefsUpdateOverCellularPermission, in IsUpdateAllowedOver()
Domaha_response_handler_action.cc95 DeltaPerformer::CanResumeUpdate(system_state_->prefs(), response.hash); in PerformAction()
101 system_state_->prefs(), false)) in PerformAction()
103 LOG_IF(WARNING, !system_state_->prefs()->SetString( in PerformAction()
120 system_state_->prefs()->SetString(current_channel_key, in PerformAction()
Dfake_system_state.h74 inline PrefsInterface* prefs() override { return prefs_; } in prefs() function
133 inline void set_prefs(PrefsInterface* prefs) { in set_prefs() argument
134 prefs_ = prefs ? prefs : &mock_prefs_; in set_prefs()
Dconnection_manager_unittest.cc345 testing::NiceMock<MockPrefs>* prefs = fake_system_state_.mock_prefs(); in TEST_F() local
355 EXPECT_CALL(*prefs, Exists(kPrefsUpdateOverCellularPermission)) in TEST_F()
362 EXPECT_CALL(*prefs, Exists(kPrefsUpdateOverCellularPermission)) in TEST_F()
365 EXPECT_CALL(*prefs, GetBoolean(kPrefsUpdateOverCellularPermission, _)) in TEST_F()
372 EXPECT_CALL(*prefs, Exists(kPrefsUpdateOverCellularPermission)) in TEST_F()
375 EXPECT_CALL(*prefs, GetBoolean(kPrefsUpdateOverCellularPermission, _)) in TEST_F()
Dsystem_state.h88 virtual PrefsInterface* prefs() = 0;
Dmetrics_utils.cc269 if (system_state->prefs()->GetInt64(state_variable_key, &stored_value)) { in WallclockDurationHelper()
280 if (!system_state->prefs()->SetInt64(state_variable_key, in WallclockDurationHelper()
Dupdate_attempter_android.h52 PrefsInterface* prefs,
Dreal_system_state.h93 inline PrefsInterface* prefs() override { return prefs_.get(); } in prefs() function
/system/update_engine/payload_consumer/
Ddelta_performer.h77 DeltaPerformer(PrefsInterface* prefs, in DeltaPerformer() argument
82 : prefs_(prefs), in DeltaPerformer()
142 static bool CanResumeUpdate(PrefsInterface* prefs,
149 static bool ResetUpdateProgress(PrefsInterface* prefs, bool quick);
Ddownload_action_unittest.cc159 MockPrefs prefs; in TestWithData() local
164 DownloadAction download_action(&prefs, in TestWithData()
277 MockPrefs prefs; in TestTerminateEarly() local
279 &prefs, in TestTerminateEarly()
377 MockPrefs prefs; in TEST() local
379 DownloadAction download_action(&prefs, in TEST()
459 MockPrefs prefs; in StartDownload() local
464 download_action_.reset(new DownloadAction(&prefs, in StartDownload()
Ddelta_performer.cc1671 bool DeltaPerformer::CanResumeUpdate(PrefsInterface* prefs, in CanResumeUpdate() argument
1674 if (!(prefs->GetInt64(kPrefsUpdateStateNextOperation, &next_operation) && in CanResumeUpdate()
1680 if (!(prefs->GetString(kPrefsUpdateCheckResponseHash, &interrupted_hash) && in CanResumeUpdate()
1688 if (prefs->GetInt64(kPrefsResumedUpdateFailures, &resumed_update_failures) && in CanResumeUpdate()
1694 if (!(prefs->GetInt64(kPrefsUpdateStateNextDataOffset, &next_data_offset) && in CanResumeUpdate()
1699 if (!(prefs->GetString(kPrefsUpdateStateSHA256Context, &sha256_context) && in CanResumeUpdate()
1704 if (!(prefs->GetInt64(kPrefsManifestMetadataSize, &manifest_metadata_size) && in CanResumeUpdate()
1709 if (!(prefs->GetInt64(kPrefsManifestSignatureSize, in CanResumeUpdate()
1717 bool DeltaPerformer::ResetUpdateProgress(PrefsInterface* prefs, bool quick) { in ResetUpdateProgress() argument
1718 TEST_AND_RETURN_FALSE(prefs->SetInt64(kPrefsUpdateStateNextOperation, in ResetUpdateProgress()
[all …]
Ddelta_performer_integration_test.cc693 MockPrefs prefs; in ApplyDeltaFile() local
694 EXPECT_CALL(prefs, SetInt64(kPrefsManifestMetadataSize, in ApplyDeltaFile()
696 EXPECT_CALL(prefs, SetInt64(kPrefsManifestSignatureSize, 0)) in ApplyDeltaFile()
698 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextOperation, _)) in ApplyDeltaFile()
700 EXPECT_CALL(prefs, GetInt64(kPrefsUpdateStateNextOperation, _)) in ApplyDeltaFile()
702 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextDataOffset, _)) in ApplyDeltaFile()
704 EXPECT_CALL(prefs, SetInt64(kPrefsUpdateStateNextDataLength, _)) in ApplyDeltaFile()
706 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSHA256Context, _)) in ApplyDeltaFile()
708 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSignedSHA256Context, _)) in ApplyDeltaFile()
711 EXPECT_CALL(prefs, SetString(kPrefsUpdateStateSignatureBlob, _)) in ApplyDeltaFile()
[all …]
Ddownload_action.cc41 DownloadAction::DownloadAction(PrefsInterface* prefs, in DownloadAction() argument
46 : prefs_(prefs), in DownloadAction()
Ddownload_action.h78 DownloadAction(PrefsInterface* prefs,
/system/update_engine/update_manager/
Dreal_updater_provider.cc306 chromeos_update_engine::PrefsInterface* prefs, in BooleanPrefVariable() argument
310 prefs_(prefs), in BooleanPrefVariable()
313 prefs->AddObserver(key, this); in BooleanPrefVariable()
435 new BooleanPrefVariable("p2p_enabled", system_state_->prefs(), in RealUpdaterProvider()
440 "cellular_enabled", system_state_->prefs(), in RealUpdaterProvider()
/system/update_engine/common/
Dcertificate_checker.cc60 CertificateChecker::CertificateChecker(PrefsInterface* prefs, in CertificateChecker() argument
62 : prefs_(prefs), openssl_wrapper_(openssl_wrapper) { in CertificateChecker()
Dcertificate_checker.h102 CertificateChecker(PrefsInterface* prefs, OpenSSLWrapper* openssl_wrapper);
/system/update_engine/payload_generator/
Dgenerate_delta_main.cc191 Prefs prefs; in ApplyDelta() local
194 LOG_IF(ERROR, !prefs.Init(base::FilePath(prefs_dir))) in ApplyDelta()
217 DeltaPerformer performer(&prefs, nullptr, nullptr, nullptr, &install_plan); in ApplyDelta()
230 DeltaPerformer::ResetUpdateProgress(&prefs, false); in ApplyDelta()

12