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

Unified Diff: components/user_prefs/tracked/pref_hash_calculator.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
Index: components/user_prefs/tracked/pref_hash_calculator.cc
diff --git a/components/user_prefs/tracked/pref_hash_calculator.cc b/components/user_prefs/tracked/pref_hash_calculator.cc
index 3d5b7fa37c2340dfac937184233b5786df8890e2..9e7a0d0d48e1b64753bb24e48721c564525e8013 100644
--- a/components/user_prefs/tracked/pref_hash_calculator.cc
+++ b/components/user_prefs/tracked/pref_hash_calculator.cc
@@ -4,6 +4,8 @@
#include "components/user_prefs/tracked/pref_hash_calculator.h"
+#include <stdint.h>
+
#include <vector>
#include "base/bind.h"
@@ -20,7 +22,7 @@ namespace {
std::string GetDigestString(const std::string& key,
const std::string& message) {
crypto::HMAC hmac(crypto::HMAC::SHA256);
- std::vector<uint8> digest(hmac.DigestLength());
+ std::vector<uint8_t> digest(hmac.DigestLength());
if (!hmac.Init(key) || !hmac.Sign(message, &digest[0], digest.size())) {
NOTREACHED();
return std::string();
@@ -34,7 +36,7 @@ bool VerifyDigestString(const std::string& key,
const std::string& message,
const std::string& digest_string) {
crypto::HMAC hmac(crypto::HMAC::SHA256);
- std::vector<uint8> digest;
+ std::vector<uint8_t> digest;
return base::HexStringToBytes(digest_string, &digest) && hmac.Init(key) &&
hmac.Verify(message,
base::StringPiece(reinterpret_cast<char*>(&digest[0]),
« no previous file with comments | « components/user_prefs/tracked/pref_hash_calculator.h ('k') | components/user_prefs/tracked/pref_hash_calculator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698