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

Unified Diff: net/quic/crypto/crypto_handshake_message.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/crypto_handshake_message.h ('k') | net/quic/crypto/crypto_handshake_message_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/crypto_handshake_message.cc
diff --git a/net/quic/crypto/crypto_handshake_message.cc b/net/quic/crypto/crypto_handshake_message.cc
index 7e57d5cfe093f466cdfbc6aae3c48ef73fd45088..b81b4629c7beb3813078ed73bc7fffd8ef94342b 100644
--- a/net/quic/crypto/crypto_handshake_message.cc
+++ b/net/quic/crypto/crypto_handshake_message.cc
@@ -165,19 +165,19 @@ QuicErrorCode CryptoHandshakeMessage::GetNthValue24(QuicTag tag,
}
QuicErrorCode CryptoHandshakeMessage::GetUint32(QuicTag tag,
- uint32* out) const {
- return GetPOD(tag, out, sizeof(uint32));
+ uint32_t* out) const {
+ return GetPOD(tag, out, sizeof(uint32_t));
}
QuicErrorCode CryptoHandshakeMessage::GetUint64(QuicTag tag,
- uint64* out) const {
- return GetPOD(tag, out, sizeof(uint64));
+ uint64_t* out) const {
+ return GetPOD(tag, out, sizeof(uint64_t));
}
size_t CryptoHandshakeMessage::size() const {
- size_t ret = sizeof(QuicTag) + sizeof(uint16) /* number of entries */ +
- sizeof(uint16) /* padding */;
- ret += (sizeof(QuicTag) + sizeof(uint32) /* end offset */) *
+ size_t ret = sizeof(QuicTag) + sizeof(uint16_t) /* number of entries */ +
+ sizeof(uint16_t) /* padding */;
+ ret += (sizeof(QuicTag) + sizeof(uint32_t) /* end offset */) *
tag_value_map_.size();
for (QuicTagValueMap::const_iterator i = tag_value_map_.begin();
i != tag_value_map_.end(); ++i) {
@@ -240,9 +240,9 @@ string CryptoHandshakeMessage::DebugStringInternal(size_t indent) const {
case kMSPC:
case kSRBF:
case kSWND:
- // uint32 value
+ // uint32_t value
if (it->second.size() == 4) {
- uint32 value;
+ uint32_t value;
memcpy(&value, it->second.data(), sizeof(value));
ret += base::UintToString(value);
done = true;
@@ -268,10 +268,10 @@ string CryptoHandshakeMessage::DebugStringInternal(size_t indent) const {
}
break;
case kRREJ:
- // uint32 lists
- if (it->second.size() % sizeof(uint32) == 0) {
- for (size_t j = 0; j < it->second.size(); j += sizeof(uint32)) {
- uint32 value;
+ // uint32_t lists
+ if (it->second.size() % sizeof(uint32_t) == 0) {
+ for (size_t j = 0; j < it->second.size(); j += sizeof(uint32_t)) {
+ uint32_t value;
memcpy(&value, it->second.data() + j, sizeof(value));
if (j > 0) {
ret += ",";
« no previous file with comments | « net/quic/crypto/crypto_handshake_message.h ('k') | net/quic/crypto/crypto_handshake_message_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698