Create a PolicyManager instance on the SystemState.

This patch creates the PolicyManager object on the update engine's
SystemState class, which aggregates all the singleton classes.

This patch doesn't add any functionality, other than initialize and
destroy the PolicyManager, State and Providers from the SystemState.

BUG=chromium:354079
TEST=Build.

Change-Id: Ib06d9c3d24926eaca43de2d11770ef6da7d16985
Reviewed-on: https://chromium-review.googlesource.com/191502
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/system_state.h b/system_state.h
index 8668542..2148b51 100644
--- a/system_state.h
+++ b/system_state.h
@@ -13,6 +13,12 @@
 #include "update_engine/gpio_handler.h"
 #include "update_engine/omaha_request_params.h"
 
+namespace chromeos_policy_manager {
+
+class PolicyManager;
+
+}  // namespace chromeos_policy_manager
+
 namespace chromeos_update_engine {
 
 // SystemState is the root class within the update engine. So we should avoid
@@ -20,12 +26,12 @@
 // the required classes.
 class ClockInterface;
 class ConnectionManager;
-class HardwareInterface;
-class PrefsInterface;
-class PayloadStateInterface;
 class GpioHandler;
-class UpdateAttempter;
+class HardwareInterface;
 class P2PManager;
+class PayloadStateInterface;
+class PrefsInterface;
+class UpdateAttempter;
 
 // An interface to global system context, including platform resources,
 // the current state of the system, high-level objects whose lifetime is same
@@ -33,7 +39,7 @@
 // Carved out separately so it can be mocked for unit tests.
 // Currently it has only one method, but we should start migrating other
 // methods to use this as and when needed to unit test them.
-// TODO (jaysri): Consider renaming this to something like GlobalContext.
+// TODO(jaysri): Consider renaming this to something like GlobalContext.
 class SystemState {
  public:
   // Destructs this object.
@@ -85,6 +91,9 @@
   // Returns a pointer to the P2PManager singleton.
   virtual P2PManager* p2p_manager() = 0;
 
+  // Returns a pointer to the PolicyManager singleton.
+  virtual chromeos_policy_manager::PolicyManager* policy_manager() = 0;
+
   // If true, this is the first instance of the update engine since the system
   // restarted. Important for tracking whether you are running instance of the
   // update engine on first boot or due to a crash/restart.