shill: replace rand() with std::default_random_engine
Replace rand() with STL random number generator to have
superior quality of random numbers, thread safety and
stop linter from complaining.
BUG=None
TEST=Unit tests pass.
Change-Id: I80da776c70bbd8bffe10916554393621ad60131e
Reviewed-on: https://chromium-review.googlesource.com/204430
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/default_profile.h b/default_profile.h
index 60125fa..afae425 100644
--- a/default_profile.h
+++ b/default_profile.h
@@ -5,6 +5,7 @@
#ifndef SHILL_DEFAULT_PROFILE_H_
#define SHILL_DEFAULT_PROFILE_H_
+#include <random>
#include <string>
#include <vector>
@@ -84,6 +85,7 @@
const base::FilePath storage_path_;
const std::string profile_id_;
const Manager::Properties &props_;
+ std::default_random_engine random_engine_;
DISALLOW_COPY_AND_ASSIGN(DefaultProfile);
};