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

Unified Diff: components/variations/metrics_util.cc

Issue 1549993003: Switch to standard integer types in components/, part 4 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « components/variations/metrics_util.h ('k') | components/variations/metrics_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/variations/metrics_util.cc
diff --git a/components/variations/metrics_util.cc b/components/variations/metrics_util.cc
index 41b2df3854a94866994fd723cfeb78e014346b66..e6e76e3f128949dde23fa695c02a4c1a05d0bcaa 100644
--- a/components/variations/metrics_util.cc
+++ b/components/variations/metrics_util.cc
@@ -9,7 +9,7 @@
namespace metrics {
-uint32 HashName(const std::string& name) {
+uint32_t HashName(const std::string& name) {
// SHA-1 is designed to produce a uniformly random spread in its output space,
// even for nearly-identical inputs.
unsigned char sha1_hash[base::kSHA1Length];
@@ -17,7 +17,7 @@ uint32 HashName(const std::string& name) {
name.size(),
sha1_hash);
- uint32 bits;
+ uint32_t bits;
static_assert(sizeof(bits) < sizeof(sha1_hash), "more data required");
memcpy(&bits, sha1_hash, sizeof(bits));
« no previous file with comments | « components/variations/metrics_util.h ('k') | components/variations/metrics_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698