| OLD | NEW |
| 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/quic/quic_session.h" | 5 #include "net/quic/quic_session.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "net/quic/crypto/proof_verifier.h" | 8 #include "net/quic/crypto/proof_verifier.h" |
| 9 #include "net/quic/quic_connection.h" | 9 #include "net/quic/quic_connection.h" |
| 10 #include "net/quic/quic_flags.h" | 10 #include "net/quic/quic_flags.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 : connection_(connection), | 99 : connection_(connection), |
| 100 visitor_shim_(new VisitorShim(this)), | 100 visitor_shim_(new VisitorShim(this)), |
| 101 config_(config), | 101 config_(config), |
| 102 max_open_streams_(config_.max_streams_per_connection()), | 102 max_open_streams_(config_.max_streams_per_connection()), |
| 103 next_stream_id_(is_server() ? 2 : 3), | 103 next_stream_id_(is_server() ? 2 : 3), |
| 104 largest_peer_created_stream_id_(0), | 104 largest_peer_created_stream_id_(0), |
| 105 error_(QUIC_NO_ERROR), | 105 error_(QUIC_NO_ERROR), |
| 106 goaway_received_(false), | 106 goaway_received_(false), |
| 107 goaway_sent_(false), | 107 goaway_sent_(false), |
| 108 has_pending_handshake_(false) { | 108 has_pending_handshake_(false) { |
| 109 } |
| 110 |
| 111 void QuicSession::InitializeSession() { |
| 109 if (connection_->version() <= QUIC_VERSION_19) { | 112 if (connection_->version() <= QUIC_VERSION_19) { |
| 110 flow_controller_.reset(new QuicFlowController( | 113 flow_controller_.reset(new QuicFlowController( |
| 111 connection_.get(), 0, is_server(), kDefaultFlowControlSendWindow, | 114 connection_.get(), 0, is_server(), kDefaultFlowControlSendWindow, |
| 112 config_.GetInitialFlowControlWindowToSend(), | 115 config_.GetInitialFlowControlWindowToSend(), |
| 113 config_.GetInitialFlowControlWindowToSend())); | 116 config_.GetInitialFlowControlWindowToSend())); |
| 114 } else { | 117 } else { |
| 115 flow_controller_.reset(new QuicFlowController( | 118 flow_controller_.reset(new QuicFlowController( |
| 116 connection_.get(), 0, is_server(), kDefaultFlowControlSendWindow, | 119 connection_.get(), 0, is_server(), kDefaultFlowControlSendWindow, |
| 117 config_.GetInitialSessionFlowControlWindowToSend(), | 120 config_.GetInitialSessionFlowControlWindowToSend(), |
| 118 config_.GetInitialSessionFlowControlWindowToSend())); | 121 config_.GetInitialSessionFlowControlWindowToSend())); |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 } | 762 } |
| 760 for (DataStreamMap::iterator it = stream_map_.begin(); | 763 for (DataStreamMap::iterator it = stream_map_.begin(); |
| 761 it != stream_map_.end(); ++it) { | 764 it != stream_map_.end(); ++it) { |
| 762 if (version <= QUIC_VERSION_16) { | 765 if (version <= QUIC_VERSION_16) { |
| 763 it->second->flow_controller()->Disable(); | 766 it->second->flow_controller()->Disable(); |
| 764 } | 767 } |
| 765 } | 768 } |
| 766 } | 769 } |
| 767 | 770 |
| 768 } // namespace net | 771 } // namespace net |
| OLD | NEW |