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

Side by Side Diff: net/quic/quic_session.cc

Issue 706203003: Update from https://crrev.com/303153 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_session_test.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 #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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 bool HasOpenDataStreams() const override { 90 bool HasOpenDataStreams() const override {
91 return session_->HasOpenDataStreams(); 91 return session_->HasOpenDataStreams();
92 } 92 }
93 93
94 private: 94 private:
95 QuicSession* session_; 95 QuicSession* session_;
96 }; 96 };
97 97
98 QuicSession::QuicSession(QuicConnection* connection, const QuicConfig& config) 98 QuicSession::QuicSession(QuicConnection* connection, const QuicConfig& config,
99 bool is_secure)
99 : connection_(connection), 100 : connection_(connection),
100 visitor_shim_(new VisitorShim(this)), 101 visitor_shim_(new VisitorShim(this)),
101 config_(config), 102 config_(config),
102 max_open_streams_(config_.MaxStreamsPerConnection()), 103 max_open_streams_(config_.MaxStreamsPerConnection()),
103 next_stream_id_(is_server() ? 2 : 5), 104 next_stream_id_(is_server() ? 2 : 5),
104 largest_peer_created_stream_id_(0), 105 largest_peer_created_stream_id_(0),
105 error_(QUIC_NO_ERROR), 106 error_(QUIC_NO_ERROR),
106 goaway_received_(false), 107 goaway_received_(false),
107 goaway_sent_(false), 108 goaway_sent_(false),
108 has_pending_handshake_(false) { 109 has_pending_handshake_(false),
110 is_secure_(is_secure) {
109 if (connection_->version() == QUIC_VERSION_19) { 111 if (connection_->version() == QUIC_VERSION_19) {
110 flow_controller_.reset(new QuicFlowController( 112 flow_controller_.reset(new QuicFlowController(
111 connection_.get(), 0, is_server(), kDefaultFlowControlSendWindow, 113 connection_.get(), 0, is_server(), kDefaultFlowControlSendWindow,
112 config_.GetInitialFlowControlWindowToSend(), 114 config_.GetInitialFlowControlWindowToSend(),
113 config_.GetInitialFlowControlWindowToSend())); 115 config_.GetInitialFlowControlWindowToSend()));
114 } else { 116 } else {
115 flow_controller_.reset(new QuicFlowController( 117 flow_controller_.reset(new QuicFlowController(
116 connection_.get(), 0, is_server(), kDefaultFlowControlSendWindow, 118 connection_.get(), 0, is_server(), kDefaultFlowControlSendWindow,
117 config_.GetInitialSessionFlowControlWindowToSend(), 119 config_.GetInitialSessionFlowControlWindowToSend(),
118 config_.GetInitialSessionFlowControlWindowToSend())); 120 config_.GetInitialSessionFlowControlWindowToSend()));
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 for (DataStreamMap::iterator it = stream_map_.begin(); 790 for (DataStreamMap::iterator it = stream_map_.begin();
789 it != stream_map_.end(); ++it) { 791 it != stream_map_.end(); ++it) {
790 if (it->second->flow_controller()->IsBlocked()) { 792 if (it->second->flow_controller()->IsBlocked()) {
791 return true; 793 return true;
792 } 794 }
793 } 795 }
794 return false; 796 return false;
795 } 797 }
796 798
797 } // namespace net 799 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698