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

Unified Diff: net/websockets/websocket_frame_parser.cc

Issue 1404673003: net/websockets: Use the (U)INTx_{MIN,MAX} macros from stdint.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« net/websockets/websocket_frame.cc ('K') | « net/websockets/websocket_frame.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_frame_parser.cc
diff --git a/net/websockets/websocket_frame_parser.cc b/net/websockets/websocket_frame_parser.cc
index 6fbc900d870875f51b207cff09d0a4b0d1866f6a..c36c467bf06e0c7b2a561b0667c2c7a4b838e6b3 100644
--- a/net/websockets/websocket_frame_parser.cc
+++ b/net/websockets/websocket_frame_parser.cc
@@ -7,7 +7,6 @@
#include <algorithm>
#include <limits>
-#include "base/basictypes.h"
#include "base/big_endian.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
@@ -29,7 +28,7 @@ const uint64_t kMaxPayloadLengthWithoutExtendedLengthField = 125;
const uint64_t kPayloadLengthWithTwoByteExtendedLengthField = 126;
const uint64_t kPayloadLengthWithEightByteExtendedLengthField = 127;
-} // Unnamed namespace.
+} // namespace.
namespace net {
@@ -134,10 +133,10 @@ void WebSocketFrameParser::DecodeFrameHeader() {
return;
base::ReadBigEndian(current, &payload_length);
current += 8;
- if (payload_length <= kuint16max ||
- payload_length > static_cast<uint64_t>(kint64max)) {
+ if (payload_length <= UINT16_MAX ||
+ payload_length > static_cast<uint64_t>(INT64_MAX)) {
websocket_error_ = kWebSocketErrorProtocolError;
- } else if (payload_length > static_cast<uint64_t>(kint32max)) {
+ } else if (payload_length > static_cast<uint64_t>(INT32_MAX)) {
websocket_error_ = kWebSocketErrorMessageTooBig;
}
}
« net/websockets/websocket_frame.cc ('K') | « net/websockets/websocket_frame.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698