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

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

Issue 1773853003: 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
Index: components/cronet/android/url_request_context_adapter.cc
diff --git a/components/cronet/android/url_request_context_adapter.cc b/components/cronet/android/url_request_context_adapter.cc
index 1a87d6879d7eb624dd44039a9ec6aebe776a70ef..0d6179a218d5082589b8fbad8fdc6b5bbb4c7d4e 100644
--- a/components/cronet/android/url_request_context_adapter.cc
+++ b/components/cronet/android/url_request_context_adapter.cc
@@ -164,7 +164,10 @@
new net::SdchOwner(context_->sdch_manager(), context_.get()));
}
+ // Currently (circa M39) enabling QUIC requires setting probability threshold.
if (config_->enable_quic) {
+ context_->http_server_properties()
+ ->SetAlternativeServiceProbabilityThreshold(0.0f);
for (size_t hint = 0; hint < config_->quic_hints.size(); ++hint) {
const URLRequestContextConfig::QuicHint& quic_hint =
*config_->quic_hints[hint];
@@ -201,7 +204,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());
}
}
load_disable_cache_ = config_->load_disable_cache;
« no previous file with comments | « components/cronet/android/cronet_url_request_context_adapter.cc ('k') | ios/chrome/browser/ios_chrome_io_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698