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

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

Issue 10874087: Merge 151720 - net: workaround compression leaks (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 3 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/buffered_spdy_framer.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_BUFFERED_SPDY_FRAMER_H_ 5 #ifndef NET_SPDY_BUFFERED_SPDY_FRAMER_H_
6 #define NET_SPDY_BUFFERED_SPDY_FRAMER_H_ 6 #define NET_SPDY_BUFFERED_SPDY_FRAMER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 SpdyStreamId stream_id, 136 SpdyStreamId stream_id,
137 uint32 delta_window_size) const; 137 uint32 delta_window_size) const;
138 SpdyCredentialControlFrame* CreateCredentialFrame( 138 SpdyCredentialControlFrame* CreateCredentialFrame(
139 const SpdyCredential& credential) const; 139 const SpdyCredential& credential) const;
140 SpdyDataFrame* CreateDataFrame(SpdyStreamId stream_id, 140 SpdyDataFrame* CreateDataFrame(SpdyStreamId stream_id,
141 const char* data, 141 const char* data,
142 uint32 len, 142 uint32 len,
143 SpdyDataFlags flags); 143 SpdyDataFlags flags);
144 SpdyPriority GetHighestPriority() const; 144 SpdyPriority GetHighestPriority() const;
145 bool IsCompressible(const SpdyFrame& frame) const; 145 bool IsCompressible(const SpdyFrame& frame) const;
146 SpdyControlFrame* CompressControlFrame(const SpdyControlFrame& frame);
147 // Specify if newly created SpdySessions should have compression enabled. 146 // Specify if newly created SpdySessions should have compression enabled.
148 static void set_enable_compression_default(bool value); 147 static void set_enable_compression_default(bool value);
149 148
150 int frames_received() const { return frames_received_; } 149 int frames_received() const { return frames_received_; }
151 150
152 private: 151 private:
153 // The size of the header_buffer_. 152 // The size of the header_buffer_.
154 enum { kHeaderBufferSize = 32 * 1024 }; 153 enum { kHeaderBufferSize = 32 * 1024 };
155 154
156 void InitHeaderStreaming(const SpdyControlFrame* frame); 155 void InitHeaderStreaming(const SpdyControlFrame* frame);
157 156
158 SpdyFramer spdy_framer_; 157 SpdyFramer spdy_framer_;
159 BufferedSpdyFramerVisitorInterface* visitor_; 158 BufferedSpdyFramerVisitorInterface* visitor_;
160 159
161 // Header block streaming state: 160 // Header block streaming state:
162 char header_buffer_[kHeaderBufferSize]; 161 char header_buffer_[kHeaderBufferSize];
163 size_t header_buffer_used_; 162 size_t header_buffer_used_;
164 bool header_buffer_valid_; 163 bool header_buffer_valid_;
165 SpdyStreamId header_stream_id_; 164 SpdyStreamId header_stream_id_;
166 scoped_ptr<SpdyFrame> control_frame_; 165 scoped_ptr<SpdyFrame> control_frame_;
167 int frames_received_; 166 int frames_received_;
168 167
169 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); 168 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer);
170 }; 169 };
171 170
172 } // namespace net 171 } // namespace net
173 172
174 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ 173 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_
OLDNEW
« no previous file with comments | « no previous file | net/spdy/buffered_spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698