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

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

Issue 10448083: Fix out of order SYN_STEAM frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix willchan's comments Created 8 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 | Annotate | Revision Log
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_FRAMER_H_ 5 #ifndef NET_SPDY_SPDY_FRAMER_H_
6 #define NET_SPDY_SPDY_FRAMER_H_ 6 #define NET_SPDY_SPDY_FRAMER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // |len| The length of the data buffer. 177 // |len| The length of the data buffer.
178 // When the other side has finished sending data on this stream, 178 // When the other side has finished sending data on this stream,
179 // this method will be called with a zero-length buffer. 179 // this method will be called with a zero-length buffer.
180 virtual void OnStreamFrameData(SpdyStreamId stream_id, 180 virtual void OnStreamFrameData(SpdyStreamId stream_id,
181 const char* data, 181 const char* data,
182 size_t len) = 0; 182 size_t len) = 0;
183 183
184 // Called when a complete setting within a SETTINGS frame has been parsed and 184 // Called when a complete setting within a SETTINGS frame has been parsed and
185 // validated. 185 // validated.
186 virtual void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) = 0; 186 virtual void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) = 0;
187
188 // Called after a control frame has been compressed to allow the visitor
189 // to record compression statistics.
190 virtual void OnControlFrameCompressed(
191 const SpdyControlFrame& uncompressed_frame,
192 const SpdyControlFrame& compressed_frame) = 0;
187 }; 193 };
188 194
189 class NET_EXPORT_PRIVATE SpdyFramer { 195 class NET_EXPORT_PRIVATE SpdyFramer {
190 public: 196 public:
191 // SPDY states. 197 // SPDY states.
192 // TODO(mbelshe): Can we move these into the implementation 198 // TODO(mbelshe): Can we move these into the implementation
193 // and avoid exposing through the header. (Needed for test) 199 // and avoid exposing through the header. (Needed for test)
194 enum SpdyState { 200 enum SpdyState {
195 SPDY_ERROR, 201 SPDY_ERROR,
196 SPDY_DONE, 202 SPDY_DONE,
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 // starts with HTTP. If it does, we likely have an HTTP response. This 572 // starts with HTTP. If it does, we likely have an HTTP response. This
567 // isn't guaranteed though: we could have gotten a settings frame and then 573 // isn't guaranteed though: we could have gotten a settings frame and then
568 // corrupt data that just looks like HTTP, but deterministic checking requires 574 // corrupt data that just looks like HTTP, but deterministic checking requires
569 // a lot more state. 575 // a lot more state.
570 bool probable_http_response_; 576 bool probable_http_response_;
571 }; 577 };
572 578
573 } // namespace net 579 } // namespace net
574 580
575 #endif // NET_SPDY_SPDY_FRAMER_H_ 581 #endif // NET_SPDY_SPDY_FRAMER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698