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

Unified Diff: chrome/browser/safe_browsing/protocol_parser.cc

Issue 1548133002: Switch to standard integer types in chrome/browser/, part 3 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: chrome/browser/safe_browsing/protocol_parser.cc
diff --git a/chrome/browser/safe_browsing/protocol_parser.cc b/chrome/browser/safe_browsing/protocol_parser.cc
index 8f44267df46c647dc040c10d3aac3f069871b3a9..fb24ffb89e55ab1a7aa55752293768e4b023dd3d 100644
--- a/chrome/browser/safe_browsing/protocol_parser.cc
+++ b/chrome/browser/safe_browsing/protocol_parser.cc
@@ -6,10 +6,12 @@
// TODOv3(shess): Review these changes carefully.
+#include <stdint.h>
#include <stdlib.h>
#include "base/format_macros.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
@@ -72,8 +74,8 @@ class BufferReader {
return true;
}
- // Read a 32-bit integer in network byte order into a local uint32.
- bool GetNet32(uint32* i) {
+ // Read a 32-bit integer in network byte order into a local uint32_t.
+ bool GetNet32(uint32_t* i) {
if (!GetData(i, sizeof(*i)))
return false;
@@ -354,7 +356,7 @@ bool ParseChunk(const char* data,
BufferReader reader(data, length);
while (!reader.empty()) {
- uint32 l = 0;
+ uint32_t l = 0;
if (!reader.GetNet32(&l) || l == 0 || l > reader.length())
return false;
« no previous file with comments | « chrome/browser/safe_browsing/protocol_parser.h ('k') | chrome/browser/safe_browsing/protocol_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698