PolicyManager: New main PolicyManager class.
The PolicyManager class is the singleton instance used by the Update
Engine to make policy requests. The PolicyManager uses a Policy pure
virtual class with the definition of all the public policy
implementation. Different platforms can implement a different
subclass of it or extend the existing one.
The Policy class comprises the set of policy related decision and
the logic implementing those.
This patch includes a new PolicyManager class and a sample Policy
for ChromeOS that will be extended when the actual policies are
migrated to this framework. A default policy is also included and
is used whenever the actual policy fails, as a safe default.
BUG=chromium:338591
TEST=Unit tests pass.
Change-Id: If60c87d8cb9031eb15b6d4d5e937f65f56c79a04
Reviewed-on: https://chromium-review.googlesource.com/186884
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/SConstruct b/SConstruct
index 9a9f007..4bd8f31 100644
--- a/SConstruct
+++ b/SConstruct
@@ -238,6 +238,8 @@
p2p_manager.cc
payload_signer.cc
payload_state.cc
+ policy_manager/chromeos_policy.cc
+ policy_manager/policy_manager.cc
policy_manager/real_random_provider.cc
policy_manager/evaluation_context.cc
policy_manager/real_shill_provider.cc
@@ -293,6 +295,7 @@
policy_manager/boxed_value_unittest.cc
policy_manager/evaluation_context_unittest.cc
policy_manager/generic_variables_unittest.cc
+ policy_manager/policy_manager_unittest.cc
policy_manager/real_random_provider_unittest.cc
policy_manager/real_shill_provider_unittest.cc
policy_manager/variable_unittest.cc