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

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: Make bi-directional stream unittests enable priority->dependency setting. 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
« no previous file with comments | « chrome/browser/io_thread.h ('k') | ios/chrome/browser/ios_chrome_io_thread.h » ('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 1e1979b6175dee05ff47739aff66749f4e76de8e..f8e9b0143bc8750b8a66c538b5c8a8173dc676c2 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -180,6 +180,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);
@@ -802,6 +807,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 =
@@ -1102,6 +1108,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);
@@ -1208,6 +1217,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
« no previous file with comments | « chrome/browser/io_thread.h ('k') | ios/chrome/browser/ios_chrome_io_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698