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

Unified Diff: net/quic/quic_stream_factory.cc

Issue 804813010: QUIC - enabled FLAGS_allow_truncated_connection_ids_for_quic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per comments in Patch Set 2 - set MockCryptoClientStream to specify a TCID of 8 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
Index: net/quic/quic_stream_factory.cc
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index 341e15877d02ea51e4f1256ba825b5010d6bc699..f2a8226d44ec96d1a0a9f0211045d3394a9c382d 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 disable_truncated_connection_ids,
const QuicTagVector& connection_options)
: require_confirmation_(true),
host_resolver_(host_resolver),
@@ -587,11 +590,14 @@ QuicStreamFactory::QuicStreamFactory(
disable_loading_server_info_for_new_servers),
load_server_info_timeout_srtt_multiplier_(
load_server_info_timeout_srtt_multiplier),
+ disable_truncated_connection_ids_(disable_truncated_connection_ids),
port_seed_(random_generator_->RandUint64()),
check_persisted_supports_quic_(true),
task_runner_(nullptr),
weak_factory_(this) {
DCHECK(transport_security_state_);
+ if (disable_truncated_connection_ids_)
+ FLAGS_allow_truncated_connection_ids_for_quic = false;
Ryan Hamilton 2015/01/08 22:28:07 Instead of assigning to FLAGS_ here, how 'bout che
ramant (doing other things) 2015/01/08 23:06:58 Done.
crypto_config_.set_user_agent_id(user_agent_id);
crypto_config_.AddCanonicalSuffix(".c.youtube.com");
crypto_config_.AddCanonicalSuffix(".googlevideo.com");
@@ -1024,6 +1030,8 @@ int QuicStreamFactory::CreateSession(
int64 srtt = GetServerNetworkStatsSmoothedRttInMicroseconds(server_id);
if (srtt > 0)
config.SetInitialRoundTripTimeUsToSend(static_cast<uint32>(srtt));
+ if (FLAGS_allow_truncated_connection_ids_for_quic)
+ config.SetBytesForConnectionIdToSend(0);
if (quic_server_info_factory_ && !server_info) {
// Start the disk cache loading so that we can persist the newer QUIC server

Powered by Google App Engine
This is Rietveld 408576698