OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "net/quic/quic_utils.h" | 5 #include "net/quic/quic_utils.h" |
6 | 6 |
7 #include <ctype.h> | 7 #include <ctype.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
| 11 #include "base/basictypes.h" |
11 #include "base/logging.h" | 12 #include "base/logging.h" |
12 #include "base/port.h" | 13 #include "base/port.h" |
13 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
14 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
15 #include "net/spdy/write_blocked_list.h" | 16 #include "net/quic/quic_write_blocked_list.h" |
16 | 17 |
17 using base::StringPiece; | 18 using base::StringPiece; |
18 using std::string; | 19 using std::string; |
19 | 20 |
20 namespace net { | 21 namespace net { |
21 | 22 |
22 // static | 23 // static |
23 uint64 QuicUtils::FNV1a_64_Hash(const char* data, int len) { | 24 uint64 QuicUtils::FNV1a_64_Hash(const char* data, int len) { |
24 static const uint64 kOffset = GG_UINT64_C(14695981039346656037); | 25 static const uint64 kOffset = GG_UINT64_C(14695981039346656037); |
25 static const uint64 kPrime = GG_UINT64_C(1099511628211); | 26 static const uint64 kPrime = GG_UINT64_C(1099511628211); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 bytes_remaining -= line_bytes; | 279 bytes_remaining -= line_bytes; |
279 offset += line_bytes; | 280 offset += line_bytes; |
280 p += line_bytes; | 281 p += line_bytes; |
281 s += '\n'; | 282 s += '\n'; |
282 } | 283 } |
283 return s; | 284 return s; |
284 } | 285 } |
285 | 286 |
286 // static | 287 // static |
287 QuicPriority QuicUtils::LowestPriority() { | 288 QuicPriority QuicUtils::LowestPriority() { |
288 return static_cast<QuicPriority>(kLowestPriority); | 289 return QuicWriteBlockedList::kLowestPriority; |
289 } | 290 } |
290 | 291 |
291 // static | 292 // static |
292 QuicPriority QuicUtils::HighestPriority() { | 293 QuicPriority QuicUtils::HighestPriority() { |
293 return static_cast<QuicPriority>(kHighestPriority); | 294 return QuicWriteBlockedList::kHighestPriority; |
294 } | 295 } |
295 | 296 |
296 } // namespace net | 297 } // namespace net |
OLD | NEW |