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

Unified Diff: net/quic/core/quic_flags_list.h

Issue 2306173003: Add a new QuicFlagSaver class for saving/restoring the values of QUIC flags in tests. (Closed)
Patch Set: Better Created 4 years, 3 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/core/quic_flags.cc ('k') | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_flags_list.h
diff --git a/net/quic/core/quic_flags.cc b/net/quic/core/quic_flags_list.h
similarity index 62%
copy from net/quic/core/quic_flags.cc
copy to net/quic/core/quic_flags_list.h
index 15c68ff8dc43274b4dace7dd4f2fba4a25fac361..a724224a9c02e5c6279d219214f01384a75a238f 100644
--- a/net/quic/core/quic_flags.cc
+++ b/net/quic/core/quic_flags_list.h
@@ -2,166 +2,169 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "net/quic/core/quic_flags.h"
+// This file intentionally does not have header guards, it's included
+// inside a macro to generate values.
+
+// This file contains the list of QUIC protocol flags.
// If true, it will return as soon as an error is detected while validating
// CHLO.
-bool FLAGS_use_early_return_when_verifying_chlo = true;
+QUIC_FLAG(bool, FLAGS_use_early_return_when_verifying_chlo, true)
// If true, QUIC BBR congestion control may be enabled via Finch and/or via QUIC
// connection options.
-bool FLAGS_quic_allow_bbr = false;
+QUIC_FLAG(bool, FLAGS_quic_allow_bbr, false)
// Time period for which a given connection_id should live in the time-wait
// state.
-int64_t FLAGS_quic_time_wait_list_seconds = 200;
+QUIC_FLAG(int64_t, FLAGS_quic_time_wait_list_seconds, 200)
// Currently, this number is quite conservative. The max QPS limit for an
// individual server silo is currently set to 1000 qps, though the actual max
// that we see in the wild is closer to 450 qps. Regardless, this means that
-// the longest time-wait list we should see is 200 seconds * 1000 qps = 200000.
+// the longest time-wait list we should see is 200 seconds * 1000 qps, 200000.
// Of course, there are usually many queries per QUIC connection, so we allow a
// factor of 3 leeway.
//
// Maximum number of connections on the time-wait list. A negative value implies
// no configured limit.
-int64_t FLAGS_quic_time_wait_list_max_connections = 600000;
+QUIC_FLAG(int64_t, FLAGS_quic_time_wait_list_max_connections, 600000)
// Enables server-side support for QUIC stateless rejects.
-bool FLAGS_enable_quic_stateless_reject_support = true;
+QUIC_FLAG(bool, FLAGS_enable_quic_stateless_reject_support, true)
// This flag is not in use, just to keep consistency for shared code.
-bool FLAGS_quic_always_log_bugs_for_tests = true;
+QUIC_FLAG(bool, FLAGS_quic_always_log_bugs_for_tests, true)
// If true, multipath is enabled for the connection.
-bool FLAGS_quic_enable_multipath = false;
+QUIC_FLAG(bool, FLAGS_quic_enable_multipath, false)
// If true, require handshake confirmation for QUIC connections, functionally
// disabling 0-rtt handshakes.
// TODO(rtenneti): Enable this flag after CryptoServerTest's are fixed.
-bool FLAGS_quic_require_handshake_confirmation = false;
+QUIC_FLAG(bool, FLAGS_quic_require_handshake_confirmation, false)
// If true, Cubic's epoch is shifted when the sender is application-limited.
-bool FLAGS_shift_quic_cubic_epoch_when_app_limited = true;
+QUIC_FLAG(bool, FLAGS_shift_quic_cubic_epoch_when_app_limited, true)
// If true, QUIC will measure head of line (HOL) blocking due between
// streams due to packet losses on the headers stream. The
// measurements will be surfaced via UMA histogram
// Net.QuicSession.HeadersHOLBlockedTime.
-bool FLAGS_quic_measure_headers_hol_blocking_time = true;
+QUIC_FLAG(bool, FLAGS_quic_measure_headers_hol_blocking_time, true)
// If true, disable pacing in QUIC.
-bool FLAGS_quic_disable_pacing_for_perf_tests = false;
+QUIC_FLAG(bool, FLAGS_quic_disable_pacing_for_perf_tests, false)
// If true, Close the connection instead of writing unencrypted stream data.
-bool FLAGS_quic_never_write_unencrypted_data = true;
+QUIC_FLAG(bool, FLAGS_quic_never_write_unencrypted_data, true)
// If true, QUIC connections can do bandwidth resumption with an initial window
// of < 10 packets.
-bool FLAGS_quic_no_lower_bw_resumption_limit = true;
+QUIC_FLAG(bool, FLAGS_quic_no_lower_bw_resumption_limit, true)
// Use largest acked in the most recent ack instead of largest acked ever in
// loss recovery.
-bool FLAGS_quic_loss_recovery_use_largest_acked = true;
+QUIC_FLAG(bool, FLAGS_quic_loss_recovery_use_largest_acked, true)
// Only set one alarm for sending at once, either the send alarm or
// retransmission alarm. Disabled because it breaks QUIC time loss detection.
-bool FLAGS_quic_only_one_sending_alarm = false;
+QUIC_FLAG(bool, FLAGS_quic_only_one_sending_alarm, false)
// If true, QUIC public reset packets will have the \"pre-v33\" public header
// flags.
-bool FLAGS_quic_use_old_public_reset_packets = true;
+QUIC_FLAG(bool, FLAGS_quic_use_old_public_reset_packets, true)
// If true, QUIC will use cheap stateless rejects without creating a full
// connection.
-bool FLAGS_quic_use_cheap_stateless_rejects = false;
+QUIC_FLAG(bool, FLAGS_quic_use_cheap_stateless_rejects, false)
// If true, QUIC respect HTTP2 SETTINGS frame rather than always close the
// connection.
-bool FLAGS_quic_respect_http2_settings_frame = true;
+QUIC_FLAG(bool, FLAGS_quic_respect_http2_settings_frame, true)
// If true, enables QUIC_VERSION_35.
-bool FLAGS_quic_enable_version_35 = true;
+QUIC_FLAG(bool, FLAGS_quic_enable_version_35, true)
// If true, re-enables QUIC_VERSION_36.
-bool FLAGS_quic_enable_version_36 = true;
+QUIC_FLAG(bool, FLAGS_quic_enable_version_36, true)
// If true, enables QUIC_VERSION_36.
-bool FLAGS_quic_enable_version_36_v2 = false;
+QUIC_FLAG(bool, FLAGS_quic_enable_version_36_v2, false)
// If true, use async codepaths to invoke ProofSource::GetProof.
-bool FLAGS_enable_async_get_proof = false;
+QUIC_FLAG(bool, FLAGS_enable_async_get_proof, false)
// If true, neuter null encrypted packets before sending the next handshake
// message.
-bool FLAGS_quic_neuter_unencrypted_when_sending = true;
+QUIC_FLAG(bool, FLAGS_quic_neuter_unencrypted_when_sending, true)
// If true, QuicAlarm::Update will call a faster UpdateImpl implementation
// instead of canceling and reregistering the alarm.
-bool FLAGS_quic_change_alarms_efficiently = true;
+QUIC_FLAG(bool, FLAGS_quic_change_alarms_efficiently, true)
// If true, requires handshake confirmations for all QUIC handshakes with
// versions less than 33.
-bool FLAGS_quic_require_handshake_confirmation_pre33 = false;
+QUIC_FLAG(bool, FLAGS_quic_require_handshake_confirmation_pre33, false)
// If true, fix a bug with which QuicStreamSequencerBuffer can\'t release block
// memory in time.
-bool FLAGS_quic_sequencer_buffer_retire_block_in_time = true;
+QUIC_FLAG(bool, FLAGS_quic_sequencer_buffer_retire_block_in_time, true)
// Remove obsolete code to force QUIC to go forward secure, now that the server
// immediately goes forward secure.
-bool FLAGS_quic_remove_obsolete_forward_secure = true;
+QUIC_FLAG(bool, FLAGS_quic_remove_obsolete_forward_secure, true)
// If true, close QUIC connection explicitly on write error due to packet being
// too large.
-bool FLAGS_quic_close_connection_on_packet_too_large = true;
+QUIC_FLAG(bool, FLAGS_quic_close_connection_on_packet_too_large, true)
// If true, close the write side of a QUIC spdy stream when all queued bytes
// have been written and a FIN has been sent.
-bool FLAGS_quic_close_stream_after_writing_queued_data = true;
+QUIC_FLAG(bool, FLAGS_quic_close_stream_after_writing_queued_data, true)
// If true, close connection with QUIC_TOO_MANY_FRAME_GAPS error when number of
// gaps in QuicStreamSequenceBuffer exceeds allowed limit.
-bool FLAGS_quic_limit_frame_gaps_in_buffer = true;
+QUIC_FLAG(bool, FLAGS_quic_limit_frame_gaps_in_buffer, true)
// If true, v33 QUIC client uses 1 bit to specify 8-byte connection id in public
// flag.
-bool FLAGS_quic_remove_v33_hacks = true;
+QUIC_FLAG(bool, FLAGS_quic_remove_v33_hacks, true)
// If true, use the CHLO packet size, not message size when determining how
// large a REJ can be.
-bool FLAGS_quic_use_chlo_packet_size = false;
+QUIC_FLAG(bool, FLAGS_quic_use_chlo_packet_size, false)
// If true, defer creation of new connection till its CHLO arrives.
-bool FLAGS_quic_buffer_packet_till_chlo = false;
+QUIC_FLAG(bool, FLAGS_quic_buffer_packet_till_chlo, false)
// If true, the connection will check whether it is application-limited, and
// notify the congestion controller about it.
-bool FLAGS_quic_enable_app_limited_check = true;
+QUIC_FLAG(bool, FLAGS_quic_enable_app_limited_check, true)
// Deprecate QuicPacketCreator::next_packet_number_length_ because it's no
// longer necessary.
-bool FLAGS_quic_simple_packet_number_length_2 = true;
+QUIC_FLAG(bool, FLAGS_quic_simple_packet_number_length_2, true)
// If true, disables QUIC version less than 32.
-bool FLAGS_quic_disable_pre_32 = false;
+QUIC_FLAG(bool, FLAGS_quic_disable_pre_32, false)
// If true, QUIC will enforce the MTU limit for connections that may require a
// small MTU.
-bool FLAGS_quic_enforce_mtu_limit = false;
+QUIC_FLAG(bool, FLAGS_quic_enforce_mtu_limit, false)
// Disable MTU probing if MTU probe causes ERR_MSG_TOO_BIG instead of aborting
// the connection.
-bool FLAGS_graceful_emsgsize_on_mtu_probe = true;
+QUIC_FLAG(bool, FLAGS_graceful_emsgsize_on_mtu_probe, true)
// If true, do not force sending ack when connection is closed because of
// message too long (EMSGSIZE) write error.
-bool FLAGS_quic_do_not_send_ack_on_emsgsize = true;
+QUIC_FLAG(bool, FLAGS_quic_do_not_send_ack_on_emsgsize, true)
// If true, postpone multipath flag validation to ProcessValidatedPacket.
-bool FLAGS_quic_postpone_multipath_flag_validation = true;
+QUIC_FLAG(bool, FLAGS_quic_postpone_multipath_flag_validation, true)
// If true, set a QUIC connection's last_sent_for_timeout_ to the send time of
// the first packet sent after receiving a packet, even if the sent packet is
// a retransmission
-bool FLAGS_quic_better_last_send_for_timeout = true;
+QUIC_FLAG(bool, FLAGS_quic_better_last_send_for_timeout, true)
« no previous file with comments | « net/quic/core/quic_flags.cc ('k') | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698