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

Unified Diff: net/cert/ct_serialization.cc

Issue 1158923005: Use the exact-width integer types defined in <stdint.h> rather than (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comments. Exclude mime_sniffer*. Rebase. Created 5 years, 7 months 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: net/cert/ct_serialization.cc
diff --git a/net/cert/ct_serialization.cc b/net/cert/ct_serialization.cc
index 489717a9686088c9c41262bfcd8b4ce97058e0d8..6ea3cedc20fabe7e5bacbf2a3458eafdf3d233c5 100644
--- a/net/cert/ct_serialization.cc
+++ b/net/cert/ct_serialization.cc
@@ -4,7 +4,8 @@
#include "net/cert/ct_serialization.h"
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "base/logging.h"
namespace net {
@@ -348,7 +349,7 @@ bool DecodeSignedCertificateTimestamp(
}
result->version = SignedCertificateTimestamp::SCT_VERSION_1;
- uint64 timestamp;
+ uint64_t timestamp;
base::StringPiece log_id;
base::StringPiece extensions;
if (!ReadFixedBytes(kLogIdLength, input, &log_id) ||
@@ -359,8 +360,8 @@ bool DecodeSignedCertificateTimestamp(
return false;
}
- if (timestamp > static_cast<uint64>(kint64max)) {
- DVLOG(1) << "Timestamp value too big to cast to int64: " << timestamp;
+ if (timestamp > static_cast<uint64_t>(kint64max)) {
+ DVLOG(1) << "Timestamp value too big to cast to int64_t: " << timestamp;
return false;
}
@@ -368,7 +369,7 @@ bool DecodeSignedCertificateTimestamp(
extensions.CopyToString(&result->extensions);
result->timestamp =
base::Time::UnixEpoch() +
- base::TimeDelta::FromMilliseconds(static_cast<int64>(timestamp));
+ base::TimeDelta::FromMilliseconds(static_cast<int64_t>(timestamp));
output->swap(result);
return true;

Powered by Google App Engine
This is Rietveld 408576698