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

Side by Side Diff: net/quic/quic_utils.cc

Issue 112463003: Add convenience HighestPriority and LowestPriority methods to QuicUtils. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_utils.h ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/quic/quic_utils.h ('k') | net/quic/reliable_quic_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698