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/mock_system_state.h b/mock_system_state.h
index c24528e..16cf701 100644
--- a/mock_system_state.h
+++ b/mock_system_state.h
@@ -10,12 +10,13 @@
 #include <metrics/metrics_library_mock.h>
 #include <policy/mock_device_policy.h>
 
+#include "update_engine/clock.h"
+#include "update_engine/fake_hardware.h"
 #include "update_engine/mock_dbus_wrapper.h"
 #include "update_engine/mock_gpio_handler.h"
 #include "update_engine/mock_p2p_manager.h"
 #include "update_engine/mock_payload_state.h"
-#include "update_engine/clock.h"
-#include "update_engine/fake_hardware.h"
+#include "update_engine/policy_manager/fake_policy_manager.h"
 #include "update_engine/prefs_mock.h"
 #include "update_engine/system_state.h"
 
@@ -79,6 +80,10 @@
     return p2p_manager_;
   }
 
+  inline virtual chromeos_policy_manager::PolicyManager* policy_manager() {
+    return policy_manager_;
+  }
+
   // MockSystemState-specific public method.
   inline void set_connection_manager(ConnectionManager* connection_manager) {
     connection_manager_ = connection_manager;
@@ -128,6 +133,11 @@
     p2p_manager_ = p2p_manager;
   }
 
+  inline void set_policy_manager(
+      chromeos_policy_manager::PolicyManager *policy_manager) {
+    policy_manager_ = policy_manager;
+  }
+
   inline void set_payload_state(PayloadStateInterface *payload_state) {
     payload_state_ = payload_state;
   }
@@ -146,6 +156,7 @@
   // These are the other object we own.
   Clock default_clock_;
   FakeHardware default_hardware_;
+  chromeos_policy_manager::FakePolicyManager fake_policy_manager_;
   OmahaRequestParams default_request_params_;
 
   // These are pointers to objects which caller can override.
@@ -155,10 +166,11 @@
   PrefsInterface* powerwash_safe_prefs_;
   ConnectionManager* connection_manager_;
   OmahaRequestParams* request_params_;
-  P2PManager *p2p_manager_;
-  PayloadStateInterface *payload_state_;
+  P2PManager* p2p_manager_;
+  PayloadStateInterface* payload_state_;
+  chromeos_policy_manager::PolicyManager* policy_manager_;
 };
 
-} // namespeace chromeos_update_engine
+}  // namespace chromeos_update_engine
 
 #endif  // CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_SYSTEM_STATE_H_