summaryrefslogtreecommitdiffstats
path: root/base/rand_util_posix.cc
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-14 20:34:59 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-14 20:34:59 +0000
commit3469e7e544aeea3a5cee8aee9a8891a29c61a17d (patch)
tree4d9d1056f06f90f724ba702e94aa2b4d47da7fa6 /base/rand_util_posix.cc
parent94e9666e60bf1d5e3559bfe216845a2cb054b204 (diff)
downloadchromium_src-3469e7e544aeea3a5cee8aee9a8891a29c61a17d.zip
chromium_src-3469e7e544aeea3a5cee8aee9a8891a29c61a17d.tar.gz
chromium_src-3469e7e544aeea3a5cee8aee9a8891a29c61a17d.tar.bz2
Moving GUID generation from base to chrome/browser/guid*
Moves GUID generation into chrome/browser/guid*. GUID generation is used only within chrome/browser. So am moving it there. BUG=58813 TEST=GUIDTest.GUIDGeneratesAllZeroes, GUIDTest.GUIDGeneratesCorrectly, GUIDTest.GUIDCorrectlyFormatted, MetricsServiceTest.ClientIdCorrectlyFormatted Review URL: http://codereview.chromium.org/3800003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/rand_util_posix.cc')
-rw-r--r--base/rand_util_posix.cc17
1 files changed, 0 insertions, 17 deletions
diff --git a/base/rand_util_posix.cc b/base/rand_util_posix.cc
index 6a0a203..43dfd1e 100644
--- a/base/rand_util_posix.cc
+++ b/base/rand_util_posix.cc
@@ -12,7 +12,6 @@
#include "base/file_util.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
-#include "base/stringprintf.h"
namespace {
@@ -55,22 +54,6 @@ uint64 RandUint64() {
return number;
}
-// TODO(cmasone): Once we're comfortable this works, migrate Windows code to
-// use this as well.
-std::string RandomBytesToGUIDString(const uint64 bytes[2]) {
- return StringPrintf("%08X-%04X-%04X-%04X-%012llX",
- static_cast<unsigned int>(bytes[0] >> 32),
- static_cast<unsigned int>((bytes[0] >> 16) & 0x0000ffff),
- static_cast<unsigned int>(bytes[0] & 0x0000ffff),
- static_cast<unsigned int>(bytes[1] >> 48),
- bytes[1] & 0x0000ffffffffffffULL);
-}
-
-std::string GenerateGUID() {
- uint64 sixteen_bytes[2] = { base::RandUint64(), base::RandUint64() };
- return RandomBytesToGUIDString(sixteen_bytes);
-}
-
} // namespace base
int GetUrandomFD(void) {