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

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

Issue 1171183002: Use struct AlternativeService in OnAltSvc() and OnSpdyAltSvc() methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « net/spdy/spdy_alt_svc_wire_format_test.cc ('k') | net/spdy/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_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 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <utility> 12 #include <utility>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/basictypes.h" 15 #include "base/basictypes.h"
16 #include "base/gtest_prod_util.h" 16 #include "base/gtest_prod_util.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/strings/string_piece.h" 18 #include "base/strings/string_piece.h"
19 #include "base/sys_byteorder.h" 19 #include "base/sys_byteorder.h"
20 #include "net/base/net_export.h" 20 #include "net/base/net_export.h"
21 #include "net/spdy/hpack_decoder.h" 21 #include "net/spdy/hpack_decoder.h"
22 #include "net/spdy/hpack_encoder.h" 22 #include "net/spdy/hpack_encoder.h"
23 #include "net/spdy/spdy_alt_svc_wire_format.h"
23 #include "net/spdy/spdy_header_block.h" 24 #include "net/spdy/spdy_header_block.h"
24 #include "net/spdy/spdy_protocol.h" 25 #include "net/spdy/spdy_protocol.h"
25 26
26 // TODO(akalin): Remove support for CREDENTIAL frames. 27 // TODO(akalin): Remove support for CREDENTIAL frames.
27 28
28 typedef struct z_stream_s z_stream; // Forward declaration for zlib. 29 typedef struct z_stream_s z_stream; // Forward declaration for zlib.
29 30
30 namespace net { 31 namespace net {
31 32
32 class HttpProxyClientSocketPoolTest; 33 class HttpProxyClientSocketPoolTest;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 virtual void OnPushPromise(SpdyStreamId stream_id, 261 virtual void OnPushPromise(SpdyStreamId stream_id,
261 SpdyStreamId promised_stream_id, 262 SpdyStreamId promised_stream_id,
262 bool end) = 0; 263 bool end) = 0;
263 264
264 // Called when a CONTINUATION frame is received. 265 // Called when a CONTINUATION frame is received.
265 // Note that header block data is not included. See 266 // Note that header block data is not included. See
266 // OnControlFrameHeaderData(). 267 // OnControlFrameHeaderData().
267 virtual void OnContinuation(SpdyStreamId stream_id, bool end) = 0; 268 virtual void OnContinuation(SpdyStreamId stream_id, bool end) = 0;
268 269
269 // Called when an ALTSVC frame has been parsed. 270 // Called when an ALTSVC frame has been parsed.
270 virtual void OnAltSvc(SpdyStreamId stream_id, 271 virtual void OnAltSvc(
271 uint32 max_age, 272 SpdyStreamId stream_id,
272 uint16 port, 273 base::StringPiece origin,
273 base::StringPiece protocol_id, 274 const SpdyAltSvcWireFormat::AlternativeService& altsvc) {}
274 base::StringPiece host,
275 base::StringPiece origin) {}
276 275
277 // Called when a PRIORITY frame is received. 276 // Called when a PRIORITY frame is received.
278 virtual void OnPriority(SpdyStreamId stream_id, 277 virtual void OnPriority(SpdyStreamId stream_id,
279 SpdyStreamId parent_stream_id, 278 SpdyStreamId parent_stream_id,
280 uint8 weight, 279 uint8 weight,
281 bool exclusive) {} 280 bool exclusive) {}
282 281
283 // Called when a frame type we don't recognize is received. 282 // Called when a frame type we don't recognize is received.
284 // Return true if this appears to be a valid extension frame, false otherwise. 283 // Return true if this appears to be a valid extension frame, false otherwise.
285 // We distinguish between extension frames and nonsense by checking 284 // We distinguish between extension frames and nonsense by checking
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 // processed. 770 // processed.
772 bool end_stream_when_done_; 771 bool end_stream_when_done_;
773 772
774 // Last acknowledged value for SETTINGS_HEADER_TABLE_SIZE. 773 // Last acknowledged value for SETTINGS_HEADER_TABLE_SIZE.
775 size_t header_table_size_bound_; 774 size_t header_table_size_bound_;
776 }; 775 };
777 776
778 } // namespace net 777 } // namespace net
779 778
780 #endif // NET_SPDY_SPDY_FRAMER_H_ 779 #endif // NET_SPDY_SPDY_FRAMER_H_
OLDNEW
« no previous file with comments | « net/spdy/spdy_alt_svc_wire_format_test.cc ('k') | net/spdy/spdy_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698