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

Unified Diff: chrome/browser/io_thread.cc

Issue 185083002: Avoid persisting of QUIC server config information in Stable and Beta (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Persisting of QUIC server config information Created 6 years, 10 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 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(&params->enable_quic_https);
globals_->enable_quic_pacing.CopyToIfSet(
&params->enable_quic_pacing);
+ globals_->enable_quic_persist_server_info.CopyToIfSet(
+ &params->enable_quic_persist_server_info);
globals_->enable_quic_port_selection.CopyToIfSet(
&params->enable_quic_port_selection);
globals_->quic_max_packet_length.CopyToIfSet(&params->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)) {

Powered by Google App Engine
This is Rietveld 408576698