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

Unified Diff: chrome/browser/io_thread.cc

Issue 524463004: Adds plumbing for always requiring handshake confirmation in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More nits fixed, test added, and formatting. Created 6 years, 4 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: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 736e757be07fd8386fe0449340f496857e8a9f60..e32efc284d5b3ce57a4e06b06901fc9ea12c51bb 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -1046,6 +1046,8 @@ void IOThread::InitializeNetworkSessionParamsFromGlobals(
globals.enable_quic.CopyToIfSet(&params->enable_quic);
globals.enable_quic_time_based_loss_detection.CopyToIfSet(
&params->enable_quic_time_based_loss_detection);
+ globals.quic_always_require_handshake_confirmation.CopyToIfSet(
+ &params->quic_always_require_handshake_confirmation);
globals.enable_quic_port_selection.CopyToIfSet(
&params->enable_quic_port_selection);
globals.quic_max_packet_length.CopyToIfSet(&params->quic_max_packet_length);
@@ -1159,6 +1161,8 @@ void IOThread::ConfigureQuicGlobals(
globals->enable_quic_time_based_loss_detection.set(
ShouldEnableQuicTimeBasedLossDetection(command_line, quic_trial_group,
quic_trial_params));
+ globals->quic_always_require_handshake_confirmation.set(
+ ShouldQuicAlwaysRequireHandshakeConfirmation(quic_trial_params));
globals->enable_quic_port_selection.set(
ShouldEnableQuicPortSelection(command_line));
globals->quic_connection_options =
@@ -1334,6 +1338,15 @@ bool IOThread::ShouldEnableQuicTimeBasedLossDetection(
}
// static
+bool IOThread::ShouldQuicAlwaysRequireHandshakeConfirmation(
+ const VariationParameters& quic_trial_params) {
+ return LowerCaseEqualsASCII(
+ GetVariationParam(quic_trial_params,
+ "always_require_handshake_confirmation"),
+ "true");
+}
+
+// static
size_t IOThread::GetQuicMaxPacketLength(
const CommandLine& command_line,
base::StringPiece quic_trial_group,

Powered by Google App Engine
This is Rietveld 408576698