Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3364)

Unified Diff: base/rand_util.h

Issue 3800001: Factoring GUID generation from metrics to base (Closed)
Patch Set: Adding unit tests. Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/rand_util_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/rand_util.h
diff --git a/base/rand_util.h b/base/rand_util.h
index 699fc7fabbec89065ad3a4afe0146c524b050b0f..d2981344d22cda987ffc23a3974243d4489bfbd0 100644
--- a/base/rand_util.h
+++ b/base/rand_util.h
@@ -6,6 +6,8 @@
#define BASE_RAND_UTIL_H_
#pragma once
+#include <string>
+
#include "base/basictypes.h"
namespace base {
@@ -26,6 +28,9 @@ uint64 RandGenerator(uint64 max);
// Returns a random double in range [0, 1). Thread-safe.
double RandDouble();
+// Generate a 128-bit random GUID of the form: "%08X-%04X-%04X-%04X-%012llX".
+std::string GenerateGUID();
+
} // namespace base
#endif // BASE_RAND_UTIL_H_
« no previous file with comments | « no previous file | base/rand_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698