Lines Matching refs:Policy
31 #include "update_engine/update_manager/policy.h"
56 // PolicyRequest() evaluates the given policy with the provided arguments and
58 // Policy class for the policy request to call. The UpdateManager will call
59 // this method on the right policy. The pointer |result| must not be null
63 // When the policy request succeeds, the |result| is set and the method
65 // policy called with this method should not block (i.e. return
70 // um.PolicyRequest(&Policy::SomePolicyMethod, &bool_result, arg1, arg2);
73 EvalStatus (Policy::*policy_method)(EvaluationContext*, State*,
78 // Evaluates the given |policy_method| policy with the provided |args|
81 // If the policy implementation should block, returning a
83 // policy until another status is returned. If the policy implementation based
89 EvalStatus (Policy::*policy_method)(EvaluationContext*, State*,
95 // The UpdateManager receives ownership of the passed Policy instance.
96 void set_policy(const Policy* policy) {
97 policy_.reset(policy);
112 // policy with the given |args| arguments. If the method fails, the default
113 // policy is used instead.
117 EvalStatus (Policy::*policy_method)(EvaluationContext*, State*,
125 // returned by the policy. If the evaluation returns an
132 EvalStatus (Policy::*policy_method)(EvaluationContext*, State*,
140 // The policy used by the UpdateManager. Note that since it is a const Policy,
141 // policy implementations are not allowed to persist state on this class.
142 std::unique_ptr<const Policy> policy_;
144 // A safe default value to the current policy. This policy is used whenever
145 // a policy implementation fails with EvalStatus::kFailed.
154 // Timeout for a policy evaluation.