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

Unified Diff: trunk/src/net/quic/quic_utils.cc

Issue 15018013: Revert 198736 "Land Recent QUIC changes" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | « trunk/src/net/quic/quic_utils.h ('k') | trunk/src/net/quic/reliable_quic_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/net/quic/quic_utils.cc
===================================================================
--- trunk/src/net/quic/quic_utils.cc (revision 198763)
+++ trunk/src/net/quic/quic_utils.cc (working copy)
@@ -10,23 +10,6 @@
namespace net {
// static
-uint64 QuicUtils::FNV1a_64_Hash(const char* data, int len) {
- static const uint64 kOffset = 14695981039346656037u;
- static const uint64 kPrime = 1099511628211u;
-
- const uint8* octets = reinterpret_cast<const uint8*>(data);
-
- uint64 hash = kOffset;
-
- for (int i = 0; i < len; ++i) {
- hash = hash ^ octets[i];
- hash = hash * kPrime;
- }
-
- return hash;
-}
-
-// static
uint128 QuicUtils::FNV1a_128_Hash(const char* data, int len) {
// The following two constants are defined as part of the hash algorithm.
// see http://www.isthe.com/chongo/tech/comp/fnv/
@@ -48,23 +31,6 @@
return hash;
}
-// static
-void QuicUtils::SerializeUint128(uint128 v, uint8* out) {
- const uint64 lo = Uint128Low64(v);
- const uint64 hi = Uint128High64(v);
- // This assumes that the system is little-endian.
- memcpy(out, &lo, sizeof(lo));
- memcpy(out + sizeof(lo), &hi, sizeof(hi));
-}
-
-// static
-uint128 QuicUtils::ParseUint128(const uint8* in) {
- uint64 lo, hi;
- memcpy(&lo, in, sizeof(lo));
- memcpy(&hi, in + sizeof(lo), sizeof(hi));
- return uint128(hi, lo);
-}
-
#define RETURN_STRING_LITERAL(x) \
case x: \
return #x;
@@ -122,8 +88,6 @@
RETURN_STRING_LITERAL(QUIC_TOO_MANY_OPEN_STREAMS);
RETURN_STRING_LITERAL(QUIC_PUBLIC_RESET);
RETURN_STRING_LITERAL(QUIC_INVALID_VERSION);
- RETURN_STRING_LITERAL(QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED);
- RETURN_STRING_LITERAL(QUIC_INVALID_HEADER_ID);
RETURN_STRING_LITERAL(QUIC_CONNECTION_TIMED_OUT);
RETURN_STRING_LITERAL(QUIC_PROOF_INVALID);
RETURN_STRING_LITERAL(QUIC_CRYPTO_DUPLICATE_TAG);
« no previous file with comments | « trunk/src/net/quic/quic_utils.h ('k') | trunk/src/net/quic/reliable_quic_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698