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

Unified Diff: net/quic/crypto/common_cert_set.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef 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 | « net/quic/crypto/common_cert_set.h ('k') | net/quic/crypto/common_cert_set_1.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/common_cert_set.cc
diff --git a/net/quic/crypto/common_cert_set.cc b/net/quic/crypto/common_cert_set.cc
index 3d05d1fc25270c7186852a1d4464982f49811705..b771fa002f68de5408a95cbb72236150867816f1 100644
--- a/net/quic/crypto/common_cert_set.cc
+++ b/net/quic/crypto/common_cert_set.cc
@@ -4,8 +4,8 @@
#include "net/quic/crypto/common_cert_set.h"
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/singleton.h"
#include "net/quic/quic_utils.h"
@@ -32,7 +32,7 @@ struct CertSet {
// of each certificate.
const size_t* lens;
// hash contains the 64-bit, FNV-1a hash of this set.
- uint64 hash;
+ uint64_t hash;
};
const CertSet kSets[] = {
@@ -46,7 +46,7 @@ const CertSet kSets[] = {
},
};
-const uint64 kSetHashes[] = {
+const uint64_t kSetHashes[] = {
common_cert_set_1::kHash, common_cert_set_2::kHash,
};
@@ -77,10 +77,10 @@ class CommonCertSetsQUIC : public CommonCertSets {
// CommonCertSets interface.
StringPiece GetCommonHashes() const override {
return StringPiece(reinterpret_cast<const char*>(kSetHashes),
- sizeof(uint64) * arraysize(kSetHashes));
+ sizeof(uint64_t) * arraysize(kSetHashes));
}
- StringPiece GetCert(uint64 hash, uint32 index) const override {
+ StringPiece GetCert(uint64_t hash, uint32_t index) const override {
for (size_t i = 0; i < arraysize(kSets); i++) {
if (kSets[i].hash == hash) {
if (index < kSets[i].num_certs) {
@@ -97,16 +97,16 @@ class CommonCertSetsQUIC : public CommonCertSets {
bool MatchCert(StringPiece cert,
StringPiece common_set_hashes,
- uint64* out_hash,
- uint32* out_index) const override {
- if (common_set_hashes.size() % sizeof(uint64) != 0) {
+ uint64_t* out_hash,
+ uint32_t* out_index) const override {
+ if (common_set_hashes.size() % sizeof(uint64_t) != 0) {
return false;
}
- for (size_t i = 0; i < common_set_hashes.size() / sizeof(uint64); i++) {
- uint64 hash;
- memcpy(&hash, common_set_hashes.data() + i * sizeof(uint64),
- sizeof(uint64));
+ for (size_t i = 0; i < common_set_hashes.size() / sizeof(uint64_t); i++) {
+ uint64_t hash;
+ memcpy(&hash, common_set_hashes.data() + i * sizeof(uint64_t),
+ sizeof(uint64_t));
for (size_t j = 0; j < arraysize(kSets); j++) {
if (kSets[j].hash != hash) {
« no previous file with comments | « net/quic/crypto/common_cert_set.h ('k') | net/quic/crypto/common_cert_set_1.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698