Lines Matching refs:Policy
30 // The three different results of a policy request.
40 // UpdateCheckAllowed policy.
46 // A target version prefix, if imposed by policy; otherwise, an empty string.
48 // A target channel, if so imposed by policy; otherwise, an empty string.
58 // everything that a policy might need and that occurred since the first time
74 // update is seen; they are updated at the policy's descretion (via
88 // to the policy. For a newly seen payload, this should be -1.
91 // determined in the previous call to the policy. For a newly seen payload,
95 // the previous call to this policy has returned, or since this payload was
157 // policy on the next time it is called.
161 // needs to be persisted and handed back to the policy on the next time it is
168 // Other values that need to be persisted and handed to the policy as need on
171 // Whether an update failure has been identified by the policy. The client
173 // when this was done; it needs to hand these values back to the policy
184 // The Policy class is an interface to the ensemble of policy requests that the
185 // client can make. A derived class includes the policy implementations of
188 // When compile-time selection of the policy is required due to missing or extra
189 // parts in a given platform, a different Policy subclass can be used.
190 class Policy {
192 virtual ~Policy() {}
194 // Returns the name of a public policy request.
195 // IMPORTANT: Be sure to add a conditional for each new public policy that is
199 EvalStatus (Policy::*policy_method)(EvaluationContext*, State*,
204 if (reinterpret_cast<typeof(&Policy::UpdateCheckAllowed)>(
205 policy_method) == &Policy::UpdateCheckAllowed)
207 if (reinterpret_cast<typeof(&Policy::UpdateCanStart)>(
208 policy_method) == &Policy::UpdateCanStart)
210 if (reinterpret_cast<typeof(&Policy::UpdateDownloadAllowed)>(
211 policy_method) == &Policy::UpdateDownloadAllowed)
213 if (reinterpret_cast<typeof(&Policy::P2PEnabled)>(
214 policy_method) == &Policy::P2PEnabled)
216 if (reinterpret_cast<typeof(&Policy::P2PEnabledChanged)>(
217 policy_method) == &Policy::P2PEnabledChanged)
225 // List of policy requests. A policy request takes an EvaluationContext as the
253 // consult the shill provider as well as the device policy (if available).
263 // Checks whether P2P is enabled. This may consult device policy and other
273 // P2PEnabled() policy above.
279 Policy() {}
281 // Returns the name of the actual policy class.
285 DISALLOW_COPY_AND_ASSIGN(Policy);