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

Unified Diff: net/quic/quic_data_writer.cc

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/quic_crypto_server_stream.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_data_writer.cc
diff --git a/net/quic/quic_data_writer.cc b/net/quic/quic_data_writer.cc
index d48f89fe13661142aedd819df3d7b23425dba8f4..be8b357668d6b08435da36b76d8f2fdd96e9be07 100644
--- a/net/quic/quic_data_writer.cc
+++ b/net/quic/quic_data_writer.cc
@@ -11,6 +11,9 @@
#include "base/basictypes.h"
#include "base/logging.h"
+using base::StringPiece;
+using std::numeric_limits;
+
namespace net {
QuicDataWriter::QuicDataWriter(size_t size)
@@ -61,7 +64,7 @@ bool QuicDataWriter::WriteUFloat16(uint64 value) {
result = static_cast<uint16>(value);
} else if (value >= kUFloat16MaxValue) {
// Value is out of range; clamp it to the maximum representable.
- result = std::numeric_limits<uint16>::max();
+ result = numeric_limits<uint16>::max();
} else {
// The highest bit is between position 13 and 42 (zero-based), which
// corresponds to exponent 1-30. In the output, mantissa is from 0 to 10,
@@ -92,8 +95,8 @@ bool QuicDataWriter::WriteUFloat16(uint64 value) {
return WriteBytes(&result, sizeof(result));
}
-bool QuicDataWriter::WriteStringPiece16(base::StringPiece val) {
- if (val.size() > std::numeric_limits<uint16>::max()) {
+bool QuicDataWriter::WriteStringPiece16(StringPiece val) {
+ if (val.size() > numeric_limits<uint16>::max()) {
return false;
}
if (!WriteUInt16(static_cast<uint16>(val.size()))) {
« no previous file with comments | « net/quic/quic_crypto_server_stream.cc ('k') | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698