Alex Deymo | ca0aaa6 | 2014-01-06 10:39:58 -0800 | [diff] [blame] | 1 | // Copyright (c) 2014 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_PM_RANDOM_VARS_H |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_PM_RANDOM_VARS_H |
| 7 | |
| 8 | #include "base/basictypes.h" |
Gilad Arnold | b33e198 | 2014-01-27 14:46:27 -0800 | [diff] [blame^] | 9 | |
Alex Deymo | ca0aaa6 | 2014-01-06 10:39:58 -0800 | [diff] [blame] | 10 | #include "policy_manager/variable.h" |
| 11 | |
| 12 | namespace chromeos_policy_manager { |
| 13 | |
| 14 | // Return a random number every time it is requested. Note that values returned |
| 15 | // by the variables are cached by the EvaluationContext, so the returned value |
| 16 | // will be the same during the same policy request. If more random values are |
| 17 | // needed use a PRNG seeded with this value. |
| 18 | extern Variable<uint64>* var_random_seed; |
| 19 | |
| 20 | } // namespace chromeos_policy_manager |
| 21 | |
| 22 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_PM_RANDOM_VARS_H |