PolicyManager: New EvaluationContext class.
The EvaluationContext class handles the life of a policy request
evaluation caching all the results and tracking the variables used
by a the policy implementation.
This patch adds the first part of the EvaluationContex class with
its public interface and minimal support.
BUG=chromium:338590
TEST=Unit test added and passing.
Change-Id: I70e04e7e10ea30ddfb887b494b2b40557565b2da
Reviewed-on: https://chromium-review.googlesource.com/185106
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/policy_manager/variable.h b/policy_manager/variable.h
index 7dcb5b9..29fa546 100644
--- a/policy_manager/variable.h
+++ b/policy_manager/variable.h
@@ -39,6 +39,10 @@
virtual ~Variable() {}
protected:
+ // Only allow to get values through the EvaluationContext class and not
+ // directly from the variable.
+ friend class EvaluationContext;
+
friend class PmRealRandomProviderTest;
FRIEND_TEST(PmRealRandomProviderTest, GetRandomValues);