PolicyManager: Add a new State class grouping the state providers.

The policy implementations need access to the providers to discover
the variables exposed by them. Instead of having global variables to
access each providers, we add a new State interface that groups all
the providers in the same way a provider groups all the variables.

This interface class allows to create a mock/fake class for testing
the policies.

Other minor fixes to the fakes are included in this patch.

BUG=chromium:338591
TEST=Simple unit test passes.

Change-Id: I7fe46dfc8416ee39ace3290628b7bae440213b29
Reviewed-on: https://chromium-review.googlesource.com/187705
Reviewed-by: Alex Deymo <[email protected]>
Tested-by: Alex Deymo <[email protected]>
Commit-Queue: Alex Deymo <[email protected]>
diff --git a/policy_manager/policy_manager.h b/policy_manager/policy_manager.h
index d952899..d0be4e2 100644
--- a/policy_manager/policy_manager.h
+++ b/policy_manager/policy_manager.h
@@ -9,7 +9,7 @@
 
 #include "update_engine/policy_manager/default_policy.h"
 #include "update_engine/policy_manager/policy.h"
-#include "update_engine/policy_manager/random_provider.h"
+#include "update_engine/policy_manager/state.h"
 
 namespace chromeos_policy_manager {
 
@@ -38,7 +38,7 @@
   // An example call to this method is:
   //   pm.PolicyRequest(&Policy::SomePolicyMethod, &bool_result, arg1, arg2);
   template<typename T, typename R, typename... Args>
-  EvalStatus PolicyRequest(T policy_method , R* result, Args... args);
+  EvalStatus PolicyRequest(T policy_method, R* result, Args... args);
 
  private:
   friend class PmPolicyManagerTest;
@@ -54,8 +54,8 @@
   // a policy implementation fails with EvalStatusFailed.
   const DefaultPolicy default_policy_;
 
-  // Providers.
-  scoped_ptr<RandomProvider> random_;
+  // State Providers.
+  scoped_ptr<State> state_;
 
   DISALLOW_COPY_AND_ASSIGN(PolicyManager);
 };