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

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

Issue 12220116: Refactor in preparation for SPDY 4, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « net/net.gyp ('k') | 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 13 matching lines...) Expand all
24 // dynamically to hold the sequence of primitive values. The internal memory 24 // dynamically to hold the sequence of primitive values. The internal memory
25 // buffer is exposed as the "data" of the SpdyFrameBuilder. 25 // buffer is exposed as the "data" of the SpdyFrameBuilder.
26 class NET_EXPORT_PRIVATE SpdyFrameBuilder { 26 class NET_EXPORT_PRIVATE SpdyFrameBuilder {
27 public: 27 public:
28 // Initializes a SpdyFrameBuilder with a buffer of given size 28 // Initializes a SpdyFrameBuilder with a buffer of given size
29 explicit SpdyFrameBuilder(size_t size); 29 explicit SpdyFrameBuilder(size_t size);
30 30
31 // Initializes a SpdyFrameBuilder with a buffer of given size, 31 // Initializes a SpdyFrameBuilder with a buffer of given size,
32 // populate with a SPDY control frame header based on 32 // populate with a SPDY control frame header based on
33 // |type|, |flags|, and |spdy_version|. 33 // |type|, |flags|, and |spdy_version|.
34 SpdyFrameBuilder(SpdyControlType type, SpdyControlFlags flags, 34 SpdyFrameBuilder(SpdyControlType type, uint8 flags,
Ryan Hamilton 2013/02/12 16:34:52 After you get this all moved around and finish lan
akalin 2013/02/12 20:01:18 Okay. Added a TODO.
35 int spdy_version, size_t size); 35 int spdy_version, size_t size);
36 36
37 // Initiailizes a SpdyFrameBuilder with a buffer of given size, 37 // Initiailizes a SpdyFrameBuilder with a buffer of given size,
38 // populated with a SPDY data frame header based on 38 // populated with a SPDY data frame header based on
39 // |stream_id| and |flags|. 39 // |stream_id| and |flags|.
40 SpdyFrameBuilder(SpdyStreamId stream_id, SpdyDataFlags flags, size_t size); 40 SpdyFrameBuilder(SpdyStreamId stream_id, SpdyDataFlags flags, size_t size);
41 41
42 ~SpdyFrameBuilder(); 42 ~SpdyFrameBuilder();
43 43
44 // Returns the size of the SpdyFrameBuilder's data. 44 // Returns the size of the SpdyFrameBuilder's data.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 char* BeginWrite(size_t length); 101 char* BeginWrite(size_t length);
102 102
103 scoped_ptr<char[]> buffer_; 103 scoped_ptr<char[]> buffer_;
104 size_t capacity_; // Allocation size of payload (or -1 if buffer is const). 104 size_t capacity_; // Allocation size of payload (or -1 if buffer is const).
105 size_t length_; // current length of the buffer 105 size_t length_; // current length of the buffer
106 }; 106 };
107 107
108 } // namespace net 108 } // namespace net
109 109
110 #endif // NET_SPDY_SPDY_FRAME_BUILDER_H_ 110 #endif // NET_SPDY_SPDY_FRAME_BUILDER_H_
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/spdy/spdy_frame_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698