| Index: chrome/browser/io_thread.cc
|
| diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
|
| index 19d8a646404f072635fcfbdada476f959fbb581c..d3395b5ac984e500c08b568dd352dc4e5d5d4021 100644
|
| --- a/chrome/browser/io_thread.cc
|
| +++ b/chrome/browser/io_thread.cc
|
| @@ -1016,6 +1016,8 @@ void IOThread::InitializeNetworkSessionParams(
|
| globals_->enable_quic_https.CopyToIfSet(¶ms->enable_quic_https);
|
| globals_->enable_quic_pacing.CopyToIfSet(
|
| ¶ms->enable_quic_pacing);
|
| + globals_->enable_quic_persist_server_info.CopyToIfSet(
|
| + ¶ms->enable_quic_persist_server_info);
|
| globals_->enable_quic_port_selection.CopyToIfSet(
|
| ¶ms->enable_quic_port_selection);
|
| globals_->quic_max_packet_length.CopyToIfSet(¶ms->quic_max_packet_length);
|
| @@ -1107,6 +1109,8 @@ void IOThread::ConfigureQuic(const CommandLine& command_line) {
|
| ShouldEnableQuicHttps(command_line, quic_trial_group));
|
| globals_->enable_quic_pacing.set(
|
| ShouldEnableQuicPacing(command_line, quic_trial_group));
|
| + globals_->enable_quic_persist_server_info.set(
|
| + ShouldEnableQuicPersistServerInfo(command_line));
|
| globals_->enable_quic_port_selection.set(
|
| ShouldEnableQuicPortSelection(command_line));
|
| }
|
| @@ -1196,6 +1200,25 @@ bool IOThread::ShouldEnableQuicPacing(const CommandLine& command_line,
|
| return quic_trial_group.ends_with(kQuicFieldTrialPacingSuffix);
|
| }
|
|
|
| +bool IOThread::ShouldEnableQuicPersistServerInfo(
|
| + const CommandLine& command_line) {
|
| + if (command_line.HasSwitch(switches::kEnableQuicPersistServerInfo))
|
| + return true;
|
| +
|
| + if (command_line.HasSwitch(switches::kDisableQuicPersistServerInfo))
|
| + return false;
|
| +
|
| + chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
|
| + // Avoid persisting of Quic server config information to disk cache when we
|
| + // have a beta or stable release. Allow in all other cases, including when we
|
| + // do a developer build (CHANNEL_UNKNOWN).
|
| + if (channel == chrome::VersionInfo::CHANNEL_STABLE ||
|
| + channel == chrome::VersionInfo::CHANNEL_BETA) {
|
| + return false;
|
| + }
|
| + return true;
|
| +}
|
| +
|
| size_t IOThread::GetQuicMaxPacketLength(const CommandLine& command_line,
|
| base::StringPiece quic_trial_group) {
|
| if (command_line.HasSwitch(switches::kQuicMaxPacketLength)) {
|
|
|