update_engine: More accurate and general method name
This is a small review that merely changes |UpdateAttempter|'s member
function |IsUpdateRunningOrScheduled()| to a more accurate name and
general name of |IsBusyOrUpdateScheduled()|.
BUG=none
TEST=FEATURES="test" emerge-$BOARD update_engine
Change-Id: I4dcce374c86f61e6cee9d060d915110765a70a79
diff --git a/update_attempter.cc b/update_attempter.cc
index b06807d..31d728b 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -153,7 +153,7 @@
}
bool UpdateAttempter::ScheduleUpdates() {
- if (IsUpdateRunningOrScheduled())
+ if (IsBusyOrUpdateScheduled())
return false;
chromeos_update_manager::UpdateManager* const update_manager =
@@ -1018,7 +1018,7 @@
// a bug that will most likely prevent further automatic update checks. It
// seems better to crash in such cases and restart the update_engine daemon
// into, hopefully, a known good state.
- CHECK(IsUpdateRunningOrScheduled());
+ CHECK(IsBusyOrUpdateScheduled());
}
void UpdateAttempter::UpdateLastCheckedTime() {
@@ -1686,7 +1686,7 @@
return true;
}
-bool UpdateAttempter::IsUpdateRunningOrScheduled() {
+bool UpdateAttempter::IsBusyOrUpdateScheduled() {
return ((status_ != UpdateStatus::IDLE &&
status_ != UpdateStatus::UPDATED_NEED_REBOOT) ||
waiting_for_scheduled_check_);