update_engine: Use clock and fake clock from SystemState
No need to pass clock and fake clock anywhere anymore. This CL makes it
to just use those objects available from SystemState and
FakeSystemState.
BUG=b:171829801
TEST=cros_workon_make --board reef --test update_engine
Change-Id: I9a3cf6dd2057620c11b862d3317b83489c76f3ca
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2546625
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
diff --git a/common/clock_interface.h b/common/clock_interface.h
index 2228983..176505d 100644
--- a/common/clock_interface.h
+++ b/common/clock_interface.h
@@ -32,21 +32,21 @@
virtual ~ClockInterface() = default;
// Gets the current time e.g. similar to base::Time::Now().
- virtual base::Time GetWallclockTime() = 0;
+ virtual base::Time GetWallclockTime() const = 0;
// Returns monotonic time since some unspecified starting point. It
// is not increased when the system is sleeping nor is it affected
// by NTP or the user changing the time.
//
// (This is a simple wrapper around clock_gettime(2) / CLOCK_MONOTONIC_RAW.)
- virtual base::Time GetMonotonicTime() = 0;
+ virtual base::Time GetMonotonicTime() const = 0;
// Returns monotonic time since some unspecified starting point. It
// is increased when the system is sleeping but it's not affected
// by NTP or the user changing the time.
//
// (This is a simple wrapper around clock_gettime(2) / CLOCK_BOOTTIME.)
- virtual base::Time GetBootTime() = 0;
+ virtual base::Time GetBootTime() const = 0;
};
} // namespace chromeos_update_engine