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

Side by Side Diff: net/spdy/spdy_frame_builder.h

Issue 199843005: Implement padding for SPDY4/HTTP2 DATA frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nullptr => NULL & discard padding at SpdySession visitor call. Created 6 years, 9 months 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 | « no previous file | net/spdy/spdy_frame_builder.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 #ifndef NET_SPDY_SPDY_FRAME_BUILDER_H_ 5 #ifndef NET_SPDY_SPDY_FRAME_BUILDER_H_
6 #define NET_SPDY_SPDY_FRAME_BUILDER_H_ 6 #define NET_SPDY_SPDY_FRAME_BUILDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // capacity_. The given type must be a control frame type. 52 // capacity_. The given type must be a control frame type.
53 // Used only for SPDY versions <4. 53 // Used only for SPDY versions <4.
54 bool WriteControlFrameHeader(const SpdyFramer& framer, 54 bool WriteControlFrameHeader(const SpdyFramer& framer,
55 SpdyFrameType type, 55 SpdyFrameType type,
56 uint8 flags); 56 uint8 flags);
57 57
58 // Populates this frame with a SPDY data frame header using version-specific 58 // Populates this frame with a SPDY data frame header using version-specific
59 // information from the |framer| and length information from capacity_. 59 // information from the |framer| and length information from capacity_.
60 bool WriteDataFrameHeader(const SpdyFramer& framer, 60 bool WriteDataFrameHeader(const SpdyFramer& framer,
61 SpdyStreamId stream_id, 61 SpdyStreamId stream_id,
62 SpdyDataFlags flags); 62 uint8 flags);
63 63
64 // Populates this frame with a SPDY4/HTTP2 frame prefix using 64 // Populates this frame with a SPDY4/HTTP2 frame prefix using
65 // version-specific information from the |framer| and length information from 65 // version-specific information from the |framer| and length information from
66 // capacity_. The given type must be a control frame type. 66 // capacity_. The given type must be a control frame type.
67 // Used only for SPDY versions >=4. 67 // Used only for SPDY versions >=4.
68 bool WriteFramePrefix(const SpdyFramer& framer, 68 bool WriteFramePrefix(const SpdyFramer& framer,
69 SpdyFrameType type, 69 SpdyFrameType type,
70 uint8 flags, 70 uint8 flags,
71 SpdyStreamId stream_id); 71 SpdyStreamId stream_id);
72 72
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 bool CanWrite(size_t length) const; 123 bool CanWrite(size_t length) const;
124 124
125 scoped_ptr<char[]> buffer_; 125 scoped_ptr<char[]> buffer_;
126 size_t capacity_; // Allocation size of payload, set by constructor. 126 size_t capacity_; // Allocation size of payload, set by constructor.
127 size_t length_; // Current length of the buffer. 127 size_t length_; // Current length of the buffer.
128 }; 128 };
129 129
130 } // namespace net 130 } // namespace net
131 131
132 #endif // NET_SPDY_SPDY_FRAME_BUILDER_H_ 132 #endif // NET_SPDY_SPDY_FRAME_BUILDER_H_
OLDNEW
« no previous file with comments | « no previous file | net/spdy/spdy_frame_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698