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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 8343f89edb35a7d092e0e509679a1e99c917f53f..5c0d2f9f741b2c6f7b2778f93977215e2ade09b9 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -9,6 +9,7 @@
#include "base/cpu.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
+#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/profiler/scoped_tracker.h"
#include "base/rand_util.h"
@@ -32,6 +33,7 @@
#include "net/quic/quic_connection_helper.h"
#include "net/quic/quic_crypto_client_stream_factory.h"
#include "net/quic/quic_default_packet_writer.h"
+#include "net/quic/quic_flags.h"
#include "net/quic/quic_http_stream.h"
#include "net/quic/quic_protocol.h"
#include "net/quic/quic_server_id.h"
@@ -565,6 +567,7 @@ QuicStreamFactory::QuicStreamFactory(
int load_server_info_timeout,
bool disable_loading_server_info_for_new_servers,
float load_server_info_timeout_srtt_multiplier,
+ bool enable_truncated_connection_ids,
const QuicTagVector& connection_options)
: require_confirmation_(true),
host_resolver_(host_resolver),
@@ -587,6 +590,7 @@ QuicStreamFactory::QuicStreamFactory(
disable_loading_server_info_for_new_servers),
load_server_info_timeout_srtt_multiplier_(
load_server_info_timeout_srtt_multiplier),
+ enable_truncated_connection_ids_(enable_truncated_connection_ids),
port_seed_(random_generator_->RandUint64()),
check_persisted_supports_quic_(true),
task_runner_(nullptr),
@@ -1045,12 +1049,14 @@ int QuicStreamFactory::CreateSession(
QuicConfig config = config_;
config.set_max_undecryptable_packets(kMaxUndecryptablePackets);
- config.SetInitialFlowControlWindowToSend(kInitialReceiveWindowSize);
config.SetInitialStreamFlowControlWindowToSend(kInitialReceiveWindowSize);
config.SetInitialSessionFlowControlWindowToSend(kInitialReceiveWindowSize);
int64 srtt = GetServerNetworkStatsSmoothedRttInMicroseconds(server_id);
if (srtt > 0)
config.SetInitialRoundTripTimeUsToSend(static_cast<uint32>(srtt));
+ if (FLAGS_allow_truncated_connection_ids_for_quic &&
+ enable_truncated_connection_ids_)
+ config.SetBytesForConnectionIdToSend(0);
if (quic_server_info_factory_ && !server_info) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
« no previous file with comments | « net/quic/quic_stream_factory.h ('k') | net/quic/quic_stream_factory_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698