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

Unified Diff: net/base/mime_sniffer.cc

Issue 1151353005: 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: 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
« no previous file with comments | « no previous file | net/base/mime_sniffer_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/mime_sniffer.cc
diff --git a/net/base/mime_sniffer.cc b/net/base/mime_sniffer.cc
index b71e5ebe76a0e0bf82e7b0c03f08b2a79d13c25b..447f59402bd36ba8e8fa4a3088d09ff68d658985 100644
--- a/net/base/mime_sniffer.cc
+++ b/net/base/mime_sniffer.cc
@@ -92,11 +92,11 @@
// Note that our definition of HTML payload is much stricter than IE's
// definition and roughly the same as Firefox's definition.
+#include <stdint.h>
#include <string>
#include "net/base/mime_sniffer.h"
-#include "base/basictypes.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
#include "base/strings/string_util.h"
@@ -949,10 +949,10 @@ bool LooksLikeBinary(const char* content, size_t size) {
// one bit per byte, with 1 for a "binary" bit, and 0 for a "text" bit. The
// least-significant bit represents byte 0x00, the most-significant bit
// represents byte 0x1F.
- const uint32 kBinaryBits =
+ const uint32_t kBinaryBits =
~(1u << '\t' | 1u << '\n' | 1u << '\r' | 1u << '\f' | 1u << '\x1b');
for (size_t i = 0; i < size; ++i) {
- uint8 byte = static_cast<uint8>(content[i]);
+ uint8_t byte = static_cast<uint8_t>(content[i]);
if (byte < 0x20 && (kBinaryBits & (1u << byte)))
return true;
}
« no previous file with comments | « no previous file | net/base/mime_sniffer_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698