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

Unified Diff: net/quic/quic_utils.cc

Issue 11416058: Integrating the QuicStreamFactory into the network stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix static initializer Created 8 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_stream_factory_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_utils.cc
diff --git a/net/quic/quic_utils.cc b/net/quic/quic_utils.cc
index 289c910be7baed4582e030f1bc9e89de8b113f05..b7169afa90eb650cbe29e21b01a36a9b18b19b78 100644
--- a/net/quic/quic_utils.cc
+++ b/net/quic/quic_utils.cc
@@ -19,15 +19,14 @@ size_t QuicUtils::StreamFramePacketOverhead(int num_frames) {
kMinStreamFrameLength) * num_frames;
}
-// TODO(jar): put into an anonymous namespage.
-// The following two constants are defined as part of the hash algorithm.
-// 309485009821345068724781371
-static uint128 kPrime(16777216, 315);
-// 14406626329776981559649562966706236762
-static uint128 kOffset(GG_UINT64_C(780984778246553632),
- GG_UINT64_C(4400696054689967450));
-
uint128 QuicUtils::FNV1a_128_Hash(const char* data, int len) {
+ // The following two constants are defined as part of the hash algorithm.
+ // 309485009821345068724781371
+ const uint128 kPrime(16777216, 315);
+ // 14406626329776981559649562966706236762
+ const uint128 kOffset(GG_UINT64_C(780984778246553632),
+ GG_UINT64_C(4400696054689967450));
+
const uint8* octets = reinterpret_cast<const uint8*>(data);
uint128 hash = kOffset;
« no previous file with comments | « net/quic/quic_stream_factory_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698