summaryrefslogtreecommitdiffstats
path: root/net/quic/reliable_quic_stream.cc
diff options
context:
space:
mode:
authorrtenneti <rtenneti@chromium.org>2015-06-26 11:02:18 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-26 18:03:55 +0000
commitc47caabc600c5f6644c26d42e8a6fd038076899b (patch)
tree9d7489f0afa502d93ef818336a143e2a1fd853b3 /net/quic/reliable_quic_stream.cc
parentf6ee142f97f9e79441200c32486b094973f2386a (diff)
downloadchromium_src-c47caabc600c5f6644c26d42e8a6fd038076899b.zip
chromium_src-c47caabc600c5f6644c26d42e8a6fd038076899b.tar.gz
chromium_src-c47caabc600c5f6644c26d42e8a6fd038076899b.tar.bz2
Landing Recent QUIC changes until 6/23/2015 11:54 AM
(landing all changes that were reviewed). relnote: QUIC - FEC_PROTECT all streams when FLAGS_quic_send_fec_packet_only_on_fec_alarm is enabled and when client sends 'FSTR' connection option. 'FSTR' option is not being sent by chromium yet. It will be enabled by a finch trial. Moved HasClientSentConnectionOption from QuicSentPacketManager to QuicConfig. Merge internal change: 96694756 https://codereview.chromium.org/1208423002/ relnote: Make QUIC test client cache response even on error. (n/a test only) QuicTestClient::SendSynchronousRequest was returning a response-body of "", but not correctly cacheing the response. As a consequence, you could get a response of "", but if you called response_body() to get the cached body, you'd get a result of "ok/n" (or whatever the previous response body was). This small bug was causing surprises in my upcoming test client refactor. Added an expectation to an existing test to prevent regression. Merge internal change: 96674829 https://codereview.chromium.org/1209303002/ relnote: QuicTestClient now supports multi-request send. (n/a test only) This is a very small "refactor" and bug fix in preparation for an upcoming change for stateless rejects. The "StreamLimitTest" currently calls SendRequests from the underlying QuicClient to send multiple requests, when it really should call a function from the higher-level QuicTestClient. This slight inconsistency was complicating a different, larger refactor. Added support for sending multiple requests to the QuicTestClient. The function SendRequestsAndWaitForLastResponse() sends a batch of requests, and then waits for the response from the last request to return. It is analagous to the QuicClient::SendRequests() function, in that the caller should set a "response_listener" to gather the responses as they return. Also fixed a tiny bug in the QuicTestClient::OnClose() function so that it now calls the underlying QuicClient::OnClose() function. Without this, the response_listener never gets a chance to run. Merge internal change: 96674661 https://codereview.chromium.org/1208413002/ relnote: Increase max packet size on QUIC MTU probe success. No functional change yet, hence no feature flag. Merge internal change: 96614300 https://codereview.chromium.org/1212733002/ relnote: deprecating FLAGS_quic_stop_early_2. Merge internal change: 96564818 https://codereview.chromium.org/1216573002/ TBR=rch@chromium.org Review URL: https://codereview.chromium.org/1213693004 Cr-Commit-Position: refs/heads/master@{#336409}
Diffstat (limited to 'net/quic/reliable_quic_stream.cc')
-rw-r--r--net/quic/reliable_quic_stream.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index 7b1f0e8..924211f 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "net/quic/iovector.h"
+#include "net/quic/quic_flags.h"
#include "net/quic/quic_flow_controller.h"
#include "net/quic/quic_session.h"
#include "net/quic/quic_write_blocked_list.h"
@@ -136,11 +137,19 @@ ReliableQuicStream::ReliableQuicStream(QuicStreamId id, QuicSession* session)
session_->flow_controller()->auto_tune_receive_window()),
connection_flow_controller_(session_->flow_controller()),
stream_contributes_to_connection_flow_control_(true) {
+ SetFromConfig();
}
ReliableQuicStream::~ReliableQuicStream() {
}
+void ReliableQuicStream::SetFromConfig() {
+ if (FLAGS_quic_send_fec_packet_only_on_fec_alarm &&
+ session_->config()->HasClientSentConnectionOption(kFSTR, perspective_)) {
+ fec_policy_ = FEC_PROTECT_ALWAYS;
+ }
+}
+
void ReliableQuicStream::OnStreamFrame(const QuicStreamFrame& frame) {
if (read_side_closed_) {
DVLOG(1) << ENDPOINT << "Ignoring frame " << frame.stream_id;