PM: Rename the random seed variable class.
This more appropriately corresponds to how it's being used.
In general, suggesting that we follow the template
<Provider><VariableName>Variable when naming variable implementations;
this mirrors the var_<provider>_<variable_name> scheme used for global
variable pointers.
BUG=None
TEST=Builds and passes unit tests.
Change-Id: I5529805b6f349f895ebd402277f6d058842ee99b
Reviewed-on: https://chromium-review.googlesource.com/184434
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
diff --git a/policy_manager/random_provider.cc b/policy_manager/random_provider.cc
index 8359c44..225b896 100644
--- a/policy_manager/random_provider.cc
+++ b/policy_manager/random_provider.cc
@@ -22,12 +22,12 @@
namespace chromeos_policy_manager {
-// The random variable class implementation.
-class RandomVariable : public Variable<uint64_t> {
+// A random seed variable.
+class RandomSeedVariable : public Variable<uint64_t> {
public:
- RandomVariable(const string& name, FILE* fp)
+ RandomSeedVariable(const string& name, FILE* fp)
: Variable<uint64_t>(name), fp_(fp) {}
- virtual ~RandomVariable() {}
+ virtual ~RandomSeedVariable() {}
protected:
virtual const uint64_t* GetValue(base::TimeDelta /* timeout */,
@@ -54,7 +54,7 @@
}
private:
- DISALLOW_COPY_AND_ASSIGN(RandomVariable);
+ DISALLOW_COPY_AND_ASSIGN(RandomSeedVariable);
file_util::ScopedFILE fp_;
};
@@ -66,7 +66,7 @@
FILE* fp = fopen(kRandomDevice, "r");
if (!fp)
return false;
- var_random_seed = new RandomVariable("random_seed", fp);
+ var_random_seed = new RandomSeedVariable("random_seed", fp);
return true;
}