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

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

Issue 14189003: [SPDY] Incorporate latest framing changes from HTTP2 into SPDY 4 as SPDY 4a2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 7 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 #include "net/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Minimum seconds that unclaimed pushed streams will be kept in memory. 54 // Minimum seconds that unclaimed pushed streams will be kept in memory.
55 const int kMinPushedStreamLifetimeSeconds = 300; 55 const int kMinPushedStreamLifetimeSeconds = 300;
56 56
57 int NPNToSpdyVersion(NextProto next_proto) { 57 int NPNToSpdyVersion(NextProto next_proto) {
58 switch (next_proto) { 58 switch (next_proto) {
59 case kProtoSPDY2: 59 case kProtoSPDY2:
60 return kSpdyVersion2; 60 return kSpdyVersion2;
61 case kProtoSPDY3: 61 case kProtoSPDY3:
62 case kProtoSPDY31: 62 case kProtoSPDY31:
63 return kSpdyVersion3; 63 return kSpdyVersion3;
64 case kProtoSPDY4a1: 64 case kProtoSPDY4a2:
65 return kSpdyVersion4; 65 return kSpdyVersion4;
66 default: 66 default:
67 NOTREACHED(); 67 NOTREACHED();
68 } 68 }
69 return kSpdyVersion2; 69 return kSpdyVersion2;
70 } 70 }
71 71
72 base::Value* NetLogSpdySynCallback(const SpdyHeaderBlock* headers, 72 base::Value* NetLogSpdySynCallback(const SpdyHeaderBlock* headers,
73 bool fin, 73 bool fin,
74 bool unidirectional, 74 bool unidirectional,
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 437
438 SSLClientSocket* ssl_socket = GetSSLClientSocket(); 438 SSLClientSocket* ssl_socket = GetSSLClientSocket();
439 if (ssl_socket && ssl_socket->WasChannelIDSent()) { 439 if (ssl_socket && ssl_socket->WasChannelIDSent()) {
440 // According to the SPDY spec, the credential associated with the TLS 440 // According to the SPDY spec, the credential associated with the TLS
441 // connection is stored in slot[1]. 441 // connection is stored in slot[1].
442 credential_state_.SetHasCredential(GURL("https://" + 442 credential_state_.SetHasCredential(GURL("https://" +
443 host_port_pair().ToString())); 443 host_port_pair().ToString()));
444 } 444 }
445 445
446 DCHECK_GE(protocol, kProtoSPDY2); 446 DCHECK_GE(protocol, kProtoSPDY2);
447 DCHECK_LE(protocol, kProtoSPDY4a1); 447 DCHECK_LE(protocol, kProtoSPDY4a2);
448 if (protocol >= kProtoSPDY31) { 448 if (protocol >= kProtoSPDY31) {
449 flow_control_state_ = FLOW_CONTROL_STREAM_AND_SESSION; 449 flow_control_state_ = FLOW_CONTROL_STREAM_AND_SESSION;
450 session_send_window_size_ = kSpdySessionInitialWindowSize; 450 session_send_window_size_ = kSpdySessionInitialWindowSize;
451 session_recv_window_size_ = kSpdySessionInitialWindowSize; 451 session_recv_window_size_ = kSpdySessionInitialWindowSize;
452 } else if (protocol >= kProtoSPDY3) { 452 } else if (protocol >= kProtoSPDY3) {
453 flow_control_state_ = FLOW_CONTROL_STREAM; 453 flow_control_state_ = FLOW_CONTROL_STREAM;
454 } else { 454 } else {
455 flow_control_state_ = FLOW_CONTROL_NONE; 455 flow_control_state_ = FLOW_CONTROL_NONE;
456 } 456 }
457 457
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 if (!queue->empty()) { 2474 if (!queue->empty()) {
2475 SpdyStreamId stream_id = queue->front(); 2475 SpdyStreamId stream_id = queue->front();
2476 queue->pop_front(); 2476 queue->pop_front();
2477 return stream_id; 2477 return stream_id;
2478 } 2478 }
2479 } 2479 }
2480 return 0; 2480 return 0;
2481 } 2481 }
2482 2482
2483 } // namespace net 2483 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_network_transaction_spdy3_unittest.cc ('k') | net/spdy/spdy_session_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698