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/update_manager/real_shill_provider.cc b/update_manager/real_shill_provider.cc
index 0144603..4d067fd 100644
--- a/update_manager/real_shill_provider.cc
+++ b/update_manager/real_shill_provider.cc
@@ -24,6 +24,7 @@
#include <shill/dbus-constants.h>
#include <shill/dbus-proxies.h>
+using chromeos_update_engine::SystemState;
using chromeos_update_engine::connection_utils::ParseConnectionType;
using org::chromium::flimflam::ManagerProxyInterface;
using org::chromium::flimflam::ServiceProxyInterface;
@@ -97,7 +98,8 @@
bool is_connected =
(default_service_path_.IsValid() && default_service_path_.value() != "/");
var_is_connected_.SetValue(is_connected);
- var_conn_last_changed_.SetValue(clock_->GetWallclockTime());
+ var_conn_last_changed_.SetValue(
+ SystemState::Get()->clock()->GetWallclockTime());
if (!is_connected) {
var_conn_type_.UnsetValue();