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

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

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_stream_sequencer_test.cc ('k') | net/quic/quic_utils.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 // Some helpers for quic 5 // Some helpers for quic
6 6
7 #ifndef NET_QUIC_QUIC_UTILS_H_ 7 #ifndef NET_QUIC_QUIC_UTILS_H_
8 #define NET_QUIC_QUIC_UTILS_H_ 8 #define NET_QUIC_QUIC_UTILS_H_
9 9
10 #include "net/base/int128.h" 10 #include "net/base/int128.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Given a binary buffer, return a hex+ASCII dump in the style of 68 // Given a binary buffer, return a hex+ASCII dump in the style of
69 // tcpdump's -X and -XX options: 69 // tcpdump's -X and -XX options:
70 // "0x0000: 0090 69bd 5400 000d 610f 0189 0800 4500 ..i.T...a.....E.\n" 70 // "0x0000: 0090 69bd 5400 000d 610f 0189 0800 4500 ..i.T...a.....E.\n"
71 // "0x0010: 001c fb98 4000 4001 7e18 d8ef 2301 455d ....@.@.~...#.E]\n" 71 // "0x0010: 001c fb98 4000 4001 7e18 d8ef 2301 455d ....@.@.~...#.E]\n"
72 // "0x0020: 7fe2 0800 6bcb 0bc6 806e ....k....n\n" 72 // "0x0020: 7fe2 0800 6bcb 0bc6 806e ....k....n\n"
73 static std::string StringToHexASCIIDump(base::StringPiece in_buffer); 73 static std::string StringToHexASCIIDump(base::StringPiece in_buffer);
74 74
75 static char* AsChars(unsigned char* data) { 75 static char* AsChars(unsigned char* data) {
76 return reinterpret_cast<char*>(data); 76 return reinterpret_cast<char*>(data);
77 } 77 }
78
79 static QuicPriority LowestPriority();
80
81 static QuicPriority HighestPriority();
78 }; 82 };
79 83
80 // Utility function that returns an IOVector object wrapped around |str|. 84 // Utility function that returns an IOVector object wrapped around |str|.
81 inline IOVector MakeIOVector(base::StringPiece str) { 85 inline IOVector MakeIOVector(base::StringPiece str) {
82 IOVector iov; 86 IOVector iov;
83 iov.Append(const_cast<char*>(str.data()), str.size()); 87 iov.Append(const_cast<char*>(str.data()), str.size());
84 return iov; 88 return iov;
85 } 89 }
86 90
87 } // namespace net 91 } // namespace net
88 92
89 #endif // NET_QUIC_QUIC_UTILS_H_ 93 #endif // NET_QUIC_QUIC_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/quic_stream_sequencer_test.cc ('k') | net/quic/quic_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698