Lines Matching refs:system_state_
123 system_state_(system_state), in UpdateAttempter()
140 prefs_ = system_state_->prefs(); in Init()
141 omaha_request_params_ = system_state_->request_params(); in Init()
159 system_state_->update_manager(); in ScheduleUpdates()
172 system_state_->metrics_reporter()->ReportCertificateCheckMetrics( in CertificateChecked()
178 Time now = system_state_->clock()->GetWallclockTime(); in CheckAndReportDailyMetrics()
179 if (system_state_->prefs()->Exists(kPrefsDailyMetricsLastReportedAt) && in CheckAndReportDailyMetrics()
180 system_state_->prefs()->GetInt64(kPrefsDailyMetricsLastReportedAt, in CheckAndReportDailyMetrics()
204 system_state_->prefs()->SetInt64(kPrefsDailyMetricsLastReportedAt, in CheckAndReportDailyMetrics()
215 if (system_state_ == nullptr) in ReportOSAge()
225 Time now = system_state_->clock()->GetWallclockTime(); in ReportOSAge()
234 system_state_->metrics_reporter()->ReportDailyMetrics(age); in ReportOSAge()
259 system_state_->metrics_reporter()->ReportUpdateCheckMetrics( in Update()
260 system_state_, in Update()
309 system_state_->set_device_policy(device_policy); in RefreshDevicePolicy()
310 system_state_->p2p_manager()->SetDevicePolicy(device_policy); in RefreshDevicePolicy()
323 if (system_state_ != nullptr) { in CalculateP2PParams()
324 if (!system_state_->p2p_manager()->IsP2PEnabled()) { in CalculateP2PParams()
340 PayloadStateInterface* const payload_state = system_state_->payload_state(); in CalculateP2PParams()
353 PayloadStateInterface* const payload_state = system_state_->payload_state(); in CalculateUpdateParams()
461 const policy::DevicePolicy* device_policy = system_state_->device_policy(); in CalculateScatteringParams()
475 } else if (system_state_->hardware()->IsOOBEEnabled() && in CalculateScatteringParams()
476 !system_state_->hardware()->IsOOBEComplete(nullptr)) { in CalculateScatteringParams()
578 system_state_->payload_state()->SetScatteringWaitPeriod( in GenerateNewWaitingPeriod()
583 bool oobe_complete = system_state_->hardware()->IsOOBEEnabled() && in CalculateStagingParams()
584 system_state_->hardware()->IsOOBEComplete(nullptr); in CalculateStagingParams()
585 auto device_policy = system_state_->device_policy(); in CalculateStagingParams()
627 GetProxyResolver(), system_state_->hardware()); in BuildUpdateActions()
633 system_state_, nullptr, std::move(update_check_fetcher), false); in BuildUpdateActions()
635 std::make_unique<OmahaResponseHandlerAction>(system_state_); in BuildUpdateActions()
637 std::make_unique<UpdateBootFlagsAction>(system_state_->boot_control()); in BuildUpdateActions()
639 system_state_, in BuildUpdateActions()
642 system_state_->hardware()), in BuildUpdateActions()
646 new LibcurlHttpFetcher(GetProxyResolver(), system_state_->hardware()); in BuildUpdateActions()
652 system_state_->boot_control(), in BuildUpdateActions()
653 system_state_->hardware(), in BuildUpdateActions()
654 system_state_, in BuildUpdateActions()
660 system_state_, in BuildUpdateActions()
663 system_state_->hardware()), in BuildUpdateActions()
668 system_state_, in BuildUpdateActions()
671 system_state_->hardware()), in BuildUpdateActions()
675 system_state_->boot_control(), system_state_->hardware()); in BuildUpdateActions()
709 const policy::DevicePolicy* device_policy = system_state_->device_policy(); in Rollback()
728 install_plan_->source_slot = system_state_->boot_control()->GetCurrentSlot(); in Rollback()
731 install_plan_->LoadPartitionsFromSlots(system_state_->boot_control())); in Rollback()
740 system_state_->boot_control(), system_state_->hardware()); in Rollback()
747 system_state_->payload_state()->Rollback(); in Rollback()
764 const unsigned int num_slots = system_state_->boot_control()->GetNumSlots(); in GetRollbackSlot()
766 system_state_->boot_control()->GetCurrentSlot(); in GetRollbackSlot()
780 system_state_->boot_control()->IsSlotBootable(slot)) { in GetRollbackSlot()
836 if (!system_state_->dlcservice()->GetInstalled(&dlc_module_ids_)) { in CheckForUpdate()
888 if (system_state_->power_manager()->RequestReboot()) in RebootIfNeeded()
900 int64_t value = system_state_->clock()->GetBootTime().ToInternalValue(); in WriteUpdateCompletedMarker()
970 last_checked_time_ = system_state_->clock()->GetWallclockTime().ToTimeT(); in UpdateLastCheckedTime()
974 DCHECK(system_state_); in UpdateRollbackHappened()
975 DCHECK(system_state_->payload_state()); in UpdateRollbackHappened()
977 if (system_state_->payload_state()->GetRollbackHappened() && in UpdateRollbackHappened()
982 system_state_->payload_state()->SetRollbackHappened(false); in UpdateRollbackHappened()
1029 system_state_->payload_state()->UpdateSucceeded(); in ProcessingDone()
1041 system_state_->payload_state()->SetScatteringWaitPeriod(TimeDelta()); in ProcessingDone()
1042 system_state_->payload_state()->SetStagingWaitPeriod(TimeDelta()); in ProcessingDone()
1070 system_state_->payload_state()->SetRollbackHappened(true); in ProcessingDone()
1071 system_state_->metrics_reporter()->ReportEnterpriseRollbackMetrics( in ProcessingDone()
1077 system_state_->payload_state()->ExpectRebootInNewVersion( in ProcessingDone()
1082 if (system_state_->payload_state()->GetRollbackVersion().empty()) { in ProcessingDone()
1228 system_state_->payload_state()->DownloadProgress(bytes_progressed); in BytesReceived()
1242 system_state_->payload_state()->DownloadComplete(); in DownloadComplete()
1277 BootControlInterface* boot_control = system_state_->boot_control(); in ResetStatus()
1288 system_state_->payload_state()->ResetUpdateStatus(); in ResetStatus()
1332 if (!system_state_->hardware()->IsNormalBootMode()) in GetErrorCodeFlags()
1338 if (!system_state_->hardware()->IsOfficialBuild()) in GetErrorCodeFlags()
1351 OmahaRequestParams* params = system_state_->request_params(); in ShouldCancel()
1409 system_state_->payload_state()->UpdateFailed(error_event_->error_code); in ScheduleErrorEventAction()
1413 system_state_->metrics_reporter()->ReportEnterpriseRollbackMetrics( in ScheduleErrorEventAction()
1420 system_state_, in ScheduleErrorEventAction()
1423 system_state_->hardware()), in ScheduleErrorEventAction()
1463 system_state_, in PingOmaha()
1466 system_state_->hardware()), in PingOmaha()
1550 if (system_state_->system_rebooted() && in UpdateEngineStarted()
1558 system_state_->payload_state()->UpdateEngineStarted(); in UpdateEngineStarted()
1563 if (system_state_ == nullptr || in StartP2PAtStartup()
1564 !system_state_->p2p_manager()->IsP2PEnabled()) { in StartP2PAtStartup()
1569 if (system_state_->p2p_manager()->CountSharedFiles() < 1) { in StartP2PAtStartup()
1579 if (system_state_ == nullptr) in StartP2PAndPerformHousekeeping()
1582 if (!system_state_->p2p_manager()->IsP2PEnabled()) { in StartP2PAndPerformHousekeeping()
1588 if (!system_state_->p2p_manager()->EnsureP2PRunning()) { in StartP2PAndPerformHousekeeping()
1594 if (!system_state_->p2p_manager()->PerformHousekeeping()) { in StartP2PAndPerformHousekeeping()
1641 if (!system_state_->hardware()->IsOfficialBuild()) { in IsAnyUpdateSourceAllowed()
1646 if (system_state_->hardware()->AreDevFeaturesEnabled()) { in IsAnyUpdateSourceAllowed()
1657 const policy::DevicePolicy* device_policy = system_state_->device_policy(); in ReportTimeToUpdateAppliedMetric()
1664 if (system_state_->prefs()->Exists(kPrefsUpdateFirstSeenAt)) { in ReportTimeToUpdateAppliedMetric()
1665 if (system_state_->prefs()->GetInt64(kPrefsUpdateFirstSeenAt, in ReportTimeToUpdateAppliedMetric()
1668 system_state_->clock()->GetWallclockTime() - in ReportTimeToUpdateAppliedMetric()
1670 system_state_->metrics_reporter() in ReportTimeToUpdateAppliedMetric()