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

Unified Diff: chrome/browser/io_thread.cc

Issue 1779733003: Fix bug in net::RequestPriority -> HTTP/2 dependency conversion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate Bence's detailed comments. Created 4 years, 9 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 5d4e3b3d149b1518f8fa3f0d676c823cee8f8f2d..81a8154f681294d0b857bc89248829f42742b98a 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -183,6 +183,11 @@ const char kNpnTrialName[] = "NPN";
const char kNpnTrialEnabledGroupNamePrefix[] = "Enable";
const char kNpnTrialDisabledGroupNamePrefix[] = "Disable";
+// Field trial for priority dependencies.
+const char kSpdyDependenciesFieldTrial[] = "SpdyEnableDependencies";
+const char kSpdyDependenciesFieldTrialEnable[] = "Enable";
+const char kSpdyDepencenciesFieldTrialDisable[] = "Disable";
+
#if defined(OS_MACOSX)
void ObserveKeychainEvents() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -807,6 +812,7 @@ void IOThread::Init() {
switches::kEnableUserAlternateProtocolPorts)) {
globals_->enable_user_alternate_protocol_ports = true;
}
+ ConfigurePriorityDependencies();
globals_->enable_brotli.set(
base::FeatureList::IsEnabled(features::kBrotliEncoding));
globals_->enable_token_binding =
@@ -1109,6 +1115,9 @@ void IOThread::InitializeNetworkSessionParamsFromGlobals(
globals.enable_brotli.CopyToIfSet(&params->enable_brotli);
+ globals.enable_priority_dependencies.CopyToIfSet(
+ &params->enable_priority_dependencies);
+
globals.enable_quic.CopyToIfSet(&params->enable_quic);
globals.disable_quic_on_timeout_with_open_streams.CopyToIfSet(
&params->disable_quic_on_timeout_with_open_streams);
@@ -1215,6 +1224,16 @@ void IOThread::UpdateDnsClientEnabled() {
globals()->host_resolver->SetDnsClientEnabled(*dns_client_enabled_);
}
+void IOThread::ConfigurePriorityDependencies() {
+ std::string group =
+ base::FieldTrialList::FindFullName(kSpdyDependenciesFieldTrial);
+ if (group == kSpdyDependenciesFieldTrialEnable) {
+ globals_->enable_priority_dependencies.set(true);
+ } else if (group == kSpdyDepencenciesFieldTrialDisable) {
+ globals_->enable_priority_dependencies.set(false);
+ }
+}
+
void IOThread::ConfigureQuic(const base::CommandLine& command_line) {
// Always fetch the field trial group to ensure it is reported correctly.
// The command line flags will be associated with a group that is reported

Powered by Google App Engine
This is Rietveld 408576698