update_engine: Use PrefsInterface from SystemState

There is no need to pass the Pref class around (at least not in cros)
since we have the SystemState as the global context and we can get the
pref from there.

BUG=b:171829801
TEST=cros_workon_make --board reef --test update_engine

Change-Id: I9f5fb8a118fab2ef0e188c42f746dafb1094972c
Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2548740
Tested-by: Amin Hassani <[email protected]>
Commit-Queue: Jae Hoon Kim <[email protected]>
Reviewed-by: Jae Hoon Kim <[email protected]>
diff --git a/common/excluder_interface.h b/common/excluder_interface.h
index 3985bba..1dfd227 100644
--- a/common/excluder_interface.h
+++ b/common/excluder_interface.h
@@ -26,6 +26,8 @@
 
 class PrefsInterface;
 
+// TODO(b/171829801): Move this interface to 'cros' directory. 'aosp' in no way
+// is using this. Not even the stub implementation.
 class ExcluderInterface {
  public:
   virtual ~ExcluderInterface() = default;
@@ -53,7 +55,7 @@
   ExcluderInterface() = default;
 };
 
-std::unique_ptr<ExcluderInterface> CreateExcluder(PrefsInterface* prefs);
+std::unique_ptr<ExcluderInterface> CreateExcluder();
 
 }  // namespace chromeos_update_engine
 
diff --git a/common/excluder_stub.cc b/common/excluder_stub.cc
index a251765..2b987fd 100644
--- a/common/excluder_stub.cc
+++ b/common/excluder_stub.cc
@@ -24,7 +24,7 @@
 
 namespace chromeos_update_engine {
 
-std::unique_ptr<ExcluderInterface> CreateExcluder(PrefsInterface* prefs) {
+std::unique_ptr<ExcluderInterface> CreateExcluder() {
   return std::make_unique<ExcluderStub>();
 }
 
diff --git a/common/system_state.h b/common/system_state.h
index 29b897b..84d026f 100644
--- a/common/system_state.h
+++ b/common/system_state.h
@@ -22,6 +22,7 @@
 #include <base/logging.h>
 
 #include "update_engine/common/clock_interface.h"
+#include "update_engine/common/prefs_interface.h"
 
 namespace chromeos_update_manager {
 
@@ -49,7 +50,6 @@
 class P2PManager;
 class PayloadStateInterface;
 class PowerManagerInterface;
-class PrefsInterface;
 class UpdateAttempter;
 
 // An interface to global system context, including platform resources,