| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/core/quic_spdy_session.h" | 5 #include "net/quic/core/quic_spdy_session.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| 11 | 11 |
| 12 #include "net/quic/core/quic_flags.h" | |
| 13 #include "net/quic/core/quic_headers_stream.h" | 12 #include "net/quic/core/quic_headers_stream.h" |
| 14 #include "net/quic/platform/api/quic_bug_tracker.h" | 13 #include "net/quic/platform/api/quic_bug_tracker.h" |
| 14 #include "net/quic/platform/api/quic_flags.h" |
| 15 #include "net/quic/platform/api/quic_logging.h" | 15 #include "net/quic/platform/api/quic_logging.h" |
| 16 #include "net/quic/platform/api/quic_str_cat.h" | 16 #include "net/quic/platform/api/quic_str_cat.h" |
| 17 | 17 |
| 18 using std::string; | 18 using std::string; |
| 19 | 19 |
| 20 namespace net { | 20 namespace net { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 class HeaderTableDebugVisitor | 24 class HeaderTableDebugVisitor |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 // is important that headers stream never flow control blocks. | 602 // is important that headers stream never flow control blocks. |
| 603 // Otherwise, busy-loop behaviour can ensue where data streams | 603 // Otherwise, busy-loop behaviour can ensue where data streams |
| 604 // data try repeatedly to write data not realizing that the | 604 // data try repeatedly to write data not realizing that the |
| 605 // tunnel through the headers stream is blocked. | 605 // tunnel through the headers stream is blocked. |
| 606 headers_stream_->flow_controller()->UpdateReceiveWindowSize( | 606 headers_stream_->flow_controller()->UpdateReceiveWindowSize( |
| 607 kStreamReceiveWindowLimit); | 607 kStreamReceiveWindowLimit); |
| 608 headers_stream_->flow_controller()->UpdateSendWindowOffset( | 608 headers_stream_->flow_controller()->UpdateSendWindowOffset( |
| 609 kStreamReceiveWindowLimit); | 609 kStreamReceiveWindowLimit); |
| 610 } | 610 } |
| 611 | 611 |
| 612 if (version > QUIC_VERSION_34) { | 612 server_push_enabled_ = |
| 613 server_push_enabled_ = | 613 FLAGS_quic_reloadable_flag_quic_enable_server_push_by_default; |
| 614 FLAGS_quic_reloadable_flag_quic_enable_server_push_by_default; | |
| 615 } | |
| 616 } | 614 } |
| 617 | 615 |
| 618 void QuicSpdySession::OnStreamFrameData(QuicStreamId stream_id, | 616 void QuicSpdySession::OnStreamFrameData(QuicStreamId stream_id, |
| 619 const char* data, | 617 const char* data, |
| 620 size_t len, | 618 size_t len, |
| 621 bool fin) { | 619 bool fin) { |
| 622 QuicSpdyStream* stream = GetSpdyDataStream(stream_id); | 620 QuicSpdyStream* stream = GetSpdyDataStream(stream_id); |
| 623 if (stream == nullptr) { | 621 if (stream == nullptr) { |
| 624 return; | 622 return; |
| 625 } | 623 } |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 set_max_uncompressed_header_bytes); | 767 set_max_uncompressed_header_bytes); |
| 770 } | 768 } |
| 771 | 769 |
| 772 void QuicSpdySession::CloseConnectionWithDetails(QuicErrorCode error, | 770 void QuicSpdySession::CloseConnectionWithDetails(QuicErrorCode error, |
| 773 const string& details) { | 771 const string& details) { |
| 774 connection()->CloseConnection( | 772 connection()->CloseConnection( |
| 775 error, details, ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); | 773 error, details, ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); |
| 776 } | 774 } |
| 777 | 775 |
| 778 } // namespace net | 776 } // namespace net |
| OLD | NEW |