Index: chrome/browser/io_thread.cc |
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc |
index 19d8a646404f072635fcfbdada476f959fbb581c..cb640646e5f45d9343f692b77c7b979feb22556d 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,19 @@ bool IOThread::ShouldEnableQuicPacing(const CommandLine& command_line, |
return quic_trial_group.ends_with(kQuicFieldTrialPacingSuffix); |
} |
+bool IOThread::ShouldEnableQuicPersistServerInfo( |
+ const CommandLine& command_line) { |
+ 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)) { |