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/real_system_state.h b/real_system_state.h
index 7c411f8..baa9c60 100644
--- a/real_system_state.h
+++ b/real_system_state.h
@@ -11,18 +11,19 @@
 #include "update_engine/connection_manager.h"
 #include "update_engine/gpio_handler.h"
 #include "update_engine/hardware.h"
+#include "update_engine/p2p_manager.h"
 #include "update_engine/payload_state.h"
+#include "update_engine/policy_manager/policy_manager.h"
 #include "update_engine/prefs.h"
 #include "update_engine/real_dbus_wrapper.h"
 #include "update_engine/update_attempter.h"
-#include "update_engine/p2p_manager.h"
 
 namespace chromeos_update_engine {
 
 // A real implementation of the SystemStateInterface which is
 // used by the actual product code.
 class RealSystemState : public SystemState {
-public:
+ public:
   // Constructors and destructors.
   RealSystemState();
   virtual ~RealSystemState() {}
@@ -84,7 +85,11 @@
     return p2p_manager_.get();
   }
 
-  virtual inline bool system_rebooted(){
+  virtual inline chromeos_policy_manager::PolicyManager* policy_manager() {
+    return &policy_manager_;
+  }
+
+  virtual inline bool system_rebooted() {
     return system_rebooted_;
   }
 
@@ -92,7 +97,7 @@
   // if the object has been initialized successfully.
   bool Initialize(bool enable_gpio);
 
-private:
+ private:
   // Interface for the clock.
   Clock clock_;
 
@@ -137,6 +142,8 @@
 
   scoped_ptr<P2PManager> p2p_manager_;
 
+  chromeos_policy_manager::PolicyManager policy_manager_;
+
   // If true, this is the first instance of the update engine since the system
   // rebooted. Important for tracking whether you are running instance of the
   // update engine on first boot or due to a crash/restart.