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

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: Fixed rch's comments from Patch set 1 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
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/resources/net_internals/quic_view.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(&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,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)) {
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/resources/net_internals/quic_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698