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

Unified Diff: base/guid_posix.cc

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 5 years 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 | « base/guid.cc ('k') | base/guid_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/guid_posix.cc
diff --git a/base/guid_posix.cc b/base/guid_posix.cc
index f0fedc27e57cb92b6a7ae3beefa027c75e4718d0..ec1ca515d34b6c607b8940b6185bef28a4d05e00 100644
--- a/base/guid_posix.cc
+++ b/base/guid_posix.cc
@@ -4,13 +4,15 @@
#include "base/guid.h"
+#include <stdint.h>
+
#include "base/rand_util.h"
#include "base/strings/stringprintf.h"
namespace base {
std::string GenerateGUID() {
- uint64 sixteen_bytes[2] = { base::RandUint64(), base::RandUint64() };
+ uint64_t sixteen_bytes[2] = {base::RandUint64(), base::RandUint64()};
// Set the GUID to version 4 as described in RFC 4122, section 4.4.
// The format of GUID version 4 must be xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx,
@@ -30,7 +32,7 @@ std::string GenerateGUID() {
// TODO(cmasone): Once we're comfortable this works, migrate Windows code to
// use this as well.
-std::string RandomDataToGUIDString(const uint64 bytes[2]) {
+std::string RandomDataToGUIDString(const uint64_t bytes[2]) {
return StringPrintf("%08X-%04X-%04X-%04X-%012llX",
static_cast<unsigned int>(bytes[0] >> 32),
static_cast<unsigned int>((bytes[0] >> 16) & 0x0000ffff),
« no previous file with comments | « base/guid.cc ('k') | base/guid_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698