| 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/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/port.h" | 12 #include "base/port.h" |
| 13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "net/spdy/write_blocked_list.h" |
| 15 | 16 |
| 16 using base::StringPiece; | 17 using base::StringPiece; |
| 17 using std::string; | 18 using std::string; |
| 18 | 19 |
| 19 namespace net { | 20 namespace net { |
| 20 | 21 |
| 21 // static | 22 // static |
| 22 uint64 QuicUtils::FNV1a_64_Hash(const char* data, int len) { | 23 uint64 QuicUtils::FNV1a_64_Hash(const char* data, int len) { |
| 23 static const uint64 kOffset = GG_UINT64_C(14695981039346656037); | 24 static const uint64 kOffset = GG_UINT64_C(14695981039346656037); |
| 24 static const uint64 kPrime = GG_UINT64_C(1099511628211); | 25 static const uint64 kPrime = GG_UINT64_C(1099511628211); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 275 } |
| 275 | 276 |
| 276 bytes_remaining -= line_bytes; | 277 bytes_remaining -= line_bytes; |
| 277 offset += line_bytes; | 278 offset += line_bytes; |
| 278 p += line_bytes; | 279 p += line_bytes; |
| 279 s += '\n'; | 280 s += '\n'; |
| 280 } | 281 } |
| 281 return s; | 282 return s; |
| 282 } | 283 } |
| 283 | 284 |
| 285 // static |
| 286 QuicPriority QuicUtils::LowestPriority() { |
| 287 return static_cast<QuicPriority>(kLowestPriority); |
| 288 } |
| 289 |
| 290 // static |
| 291 QuicPriority QuicUtils::HighestPriority() { |
| 292 return static_cast<QuicPriority>(kHighestPriority); |
| 293 } |
| 294 |
| 284 } // namespace net | 295 } // namespace net |
| OLD | NEW |