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

Unified Diff: components/cronet/android/cronet_url_request_context_adapter.cc

Issue 1802893002: Revert of Remove support for Alt-Svc/Alternate Protocol Probability (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/common/chrome_switches.cc ('k') | components/cronet/android/url_request_context_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/cronet_url_request_context_adapter.cc
diff --git a/components/cronet/android/cronet_url_request_context_adapter.cc b/components/cronet/android/cronet_url_request_context_adapter.cc
index b02bd141639fb9d4b2d01e13d64d8c36ec4fafa2..e42ed2095628c11fb25cd52e00b645e64d9be24c 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.cc
+++ b/components/cronet/android/cronet_url_request_context_adapter.cc
@@ -484,7 +484,10 @@
}
}
+ // Currently (circa M39) enabling QUIC requires setting probability threshold.
if (config->enable_quic) {
+ context_->http_server_properties()
+ ->SetAlternativeServiceProbabilityThreshold(0.0f);
for (auto hint = config->quic_hints.begin();
hint != config->quic_hints.end(); ++hint) {
const URLRequestContextConfig::QuicHint& quic_hint = **hint;
@@ -521,7 +524,8 @@
net::AlternateProtocol::QUIC, "",
static_cast<uint16_t>(quic_hint.alternate_port));
context_->http_server_properties()->SetAlternativeService(
- quic_hint_host_port_pair, alternative_service, base::Time::Max());
+ quic_hint_host_port_pair, alternative_service, 1.0f,
+ base::Time::Max());
}
}
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | components/cronet/android/url_request_context_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698