PolicyManager: Add a random number provider.

This patch adds a new provider with a single variable that returns a
random value from /dev/urandom every time it is called. The variable
is exported to all the policy implementations (currently none) in the
policy_manager/all_variables.h file.

BUG=None
TEST=unittests.

Change-Id: I6efdecd0f37f1a706b5a0dfd3a77ac4205e35aa0
Reviewed-on: https://chromium-review.googlesource.com/181537
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/policy_manager/random_vars.h b/policy_manager/random_vars.h
new file mode 100644
index 0000000..c1563c5
--- /dev/null
+++ b/policy_manager/random_vars.h
@@ -0,0 +1,21 @@
+// Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_PM_RANDOM_VARS_H
+#define CHROMEOS_PLATFORM_UPDATE_ENGINE_PM_RANDOM_VARS_H
+
+#include "base/basictypes.h"
+#include "policy_manager/variable.h"
+
+namespace chromeos_policy_manager {
+
+// Return a random number every time it is requested. Note that values returned
+// by the variables are cached by the EvaluationContext, so the returned value
+// will be the same during the same policy request. If more random values are
+// needed use a PRNG seeded with this value.
+extern Variable<uint64>* var_random_seed;
+
+}  // namespace chromeos_policy_manager
+
+#endif  // CHROMEOS_PLATFORM_UPDATE_ENGINE_PM_RANDOM_VARS_H