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

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

Issue 300553013: Add headers argument to BufferedSpdyFramerVisitorInterface::OnPushPromise (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: flip server unit test fix Created 6 years, 6 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
« 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 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Called when a GOAWAY frame has been parsed. 93 // Called when a GOAWAY frame has been parsed.
94 virtual void OnGoAway(SpdyStreamId last_accepted_stream_id, 94 virtual void OnGoAway(SpdyStreamId last_accepted_stream_id,
95 SpdyGoAwayStatus status) = 0; 95 SpdyGoAwayStatus status) = 0;
96 96
97 // Called when a WINDOW_UPDATE frame has been parsed. 97 // Called when a WINDOW_UPDATE frame has been parsed.
98 virtual void OnWindowUpdate(SpdyStreamId stream_id, 98 virtual void OnWindowUpdate(SpdyStreamId stream_id,
99 uint32 delta_window_size) = 0; 99 uint32 delta_window_size) = 0;
100 100
101 // Called when a PUSH_PROMISE frame has been parsed. 101 // Called when a PUSH_PROMISE frame has been parsed.
102 virtual void OnPushPromise(SpdyStreamId stream_id, 102 virtual void OnPushPromise(SpdyStreamId stream_id,
103 SpdyStreamId promised_stream_id) = 0; 103 SpdyStreamId promised_stream_id,
104 const SpdyHeaderBlock& headers) = 0;
104 105
105 protected: 106 protected:
106 virtual ~BufferedSpdyFramerVisitorInterface() {} 107 virtual ~BufferedSpdyFramerVisitorInterface() {}
107 108
108 private: 109 private:
109 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramerVisitorInterface); 110 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramerVisitorInterface);
110 }; 111 };
111 112
112 class NET_EXPORT_PRIVATE BufferedSpdyFramer 113 class NET_EXPORT_PRIVATE BufferedSpdyFramer
113 : public SpdyFramerVisitorInterface { 114 : public SpdyFramerVisitorInterface {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 SpdyFrame* CreateHeaders(SpdyStreamId stream_id, 190 SpdyFrame* CreateHeaders(SpdyStreamId stream_id,
190 SpdyControlFlags flags, 191 SpdyControlFlags flags,
191 const SpdyHeaderBlock* headers); 192 const SpdyHeaderBlock* headers);
192 SpdyFrame* CreateWindowUpdate( 193 SpdyFrame* CreateWindowUpdate(
193 SpdyStreamId stream_id, 194 SpdyStreamId stream_id,
194 uint32 delta_window_size) const; 195 uint32 delta_window_size) const;
195 SpdyFrame* CreateDataFrame(SpdyStreamId stream_id, 196 SpdyFrame* CreateDataFrame(SpdyStreamId stream_id,
196 const char* data, 197 const char* data,
197 uint32 len, 198 uint32 len,
198 SpdyDataFlags flags); 199 SpdyDataFlags flags);
200 SpdyFrame* CreatePushPromise(SpdyStreamId stream_id,
201 SpdyStreamId promised_stream_id,
202 const SpdyHeaderBlock* headers);
199 203
200 // Serialize a frame of unknown type. 204 // Serialize a frame of unknown type.
201 SpdySerializedFrame* SerializeFrame(const SpdyFrameIR& frame) { 205 SpdySerializedFrame* SerializeFrame(const SpdyFrameIR& frame) {
202 return spdy_framer_.SerializeFrame(frame); 206 return spdy_framer_.SerializeFrame(frame);
203 } 207 }
204 208
205 SpdyPriority GetHighestPriority() const; 209 SpdyPriority GetHighestPriority() const;
206 210
207 size_t GetDataFrameMinimumSize() const { 211 size_t GetDataFrameMinimumSize() const {
208 return spdy_framer_.GetDataFrameMinimumSize(); 212 return spdy_framer_.GetDataFrameMinimumSize();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 bool header_buffer_valid_; 249 bool header_buffer_valid_;
246 SpdyStreamId header_stream_id_; 250 SpdyStreamId header_stream_id_;
247 int frames_received_; 251 int frames_received_;
248 252
249 // Collection of fields from control frames that we need to 253 // Collection of fields from control frames that we need to
250 // buffer up from the spdy framer. 254 // buffer up from the spdy framer.
251 struct ControlFrameFields { 255 struct ControlFrameFields {
252 SpdyFrameType type; 256 SpdyFrameType type;
253 SpdyStreamId stream_id; 257 SpdyStreamId stream_id;
254 SpdyStreamId associated_stream_id; 258 SpdyStreamId associated_stream_id;
259 SpdyStreamId promised_stream_id;
255 SpdyPriority priority; 260 SpdyPriority priority;
256 uint8 credential_slot; 261 uint8 credential_slot;
257 bool fin; 262 bool fin;
258 bool unidirectional; 263 bool unidirectional;
259 }; 264 };
260 scoped_ptr<ControlFrameFields> control_frame_fields_; 265 scoped_ptr<ControlFrameFields> control_frame_fields_;
261 266
262 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); 267 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer);
263 }; 268 };
264 269
265 } // namespace net 270 } // namespace net
266 271
267 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ 272 #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