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

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

Issue 724523002: Support HTTP/2 drafts 14 and 15 simultaneously. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename CONNECTION_INFO_SPDY4 to CONNECTION_INFO_HTTP2. Created 6 years, 1 month 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
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 #include "net/spdy/buffered_spdy_framer.h" 5 #include "net/spdy/buffered_spdy_framer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace net { 9 namespace net {
10 10
11 SpdyMajorVersion NextProtoToSpdyMajorVersion(NextProto next_proto) { 11 SpdyMajorVersion NextProtoToSpdyMajorVersion(NextProto next_proto) {
12 switch (next_proto) { 12 switch (next_proto) {
13 case kProtoDeprecatedSPDY2: 13 case kProtoDeprecatedSPDY2:
14 return SPDY2; 14 return SPDY2;
15 case kProtoSPDY3: 15 case kProtoSPDY3:
16 case kProtoSPDY31: 16 case kProtoSPDY31:
17 return SPDY3; 17 return SPDY3;
18 case kProtoSPDY4: 18 case kProtoSPDY4_14:
19 case kProtoSPDY4_15:
19 return SPDY4; 20 return SPDY4;
20 case kProtoUnknown: 21 case kProtoUnknown:
21 case kProtoHTTP11: 22 case kProtoHTTP11:
22 case kProtoQUIC1SPDY3: 23 case kProtoQUIC1SPDY3:
23 break; 24 break;
24 } 25 }
25 NOTREACHED(); 26 NOTREACHED();
26 return SPDY2; 27 return SPDY2;
27 } 28 }
28 29
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 403
403 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) { 404 void BufferedSpdyFramer::InitHeaderStreaming(SpdyStreamId stream_id) {
404 memset(header_buffer_, 0, kHeaderBufferSize); 405 memset(header_buffer_, 0, kHeaderBufferSize);
405 header_buffer_used_ = 0; 406 header_buffer_used_ = 0;
406 header_buffer_valid_ = true; 407 header_buffer_valid_ = true;
407 header_stream_id_ = stream_id; 408 header_stream_id_ = stream_id;
408 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream); 409 DCHECK_NE(header_stream_id_, SpdyFramer::kInvalidStream);
409 } 410 }
410 411
411 } // namespace net 412 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_pool_unittest.cc ('k') | net/spdy/buffered_spdy_framer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698