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

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

Issue 2901093004: Add and persist a new field in AlternativeServiceInfo to list QUIC verisons advertised (Closed)
Patch Set: manually fix rebase issues Created 3 years, 6 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 | « no previous file | components/grpc_support/test/get_stream_engine.cc » ('j') | net/http/http_server_properties.h » ('J')
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 ffe89c8b13c441a061f730d972b66b739de0b2c9..ea65f7d505bdafe63cc1c4aa9cf38087f5ad27c0 100644
--- a/components/cronet/android/cronet_url_request_context_adapter.cc
+++ b/components/cronet/android/cronet_url_request_context_adapter.cc
@@ -64,6 +64,7 @@
#include "net/nqe/network_quality_estimator_params.h"
#include "net/proxy/proxy_config_service_android.h"
#include "net/proxy/proxy_service.h"
+#include "net/quic/core/quic_versions.h"
#include "net/sdch/sdch_owner.h"
#include "net/ssl/channel_id_service.h"
#include "net/url_request/url_request_context.h"
@@ -764,8 +765,17 @@ void CronetURLRequestContextAdapter::InitializeOnNetworkThread(
url::SchemeHostPort quic_server("https", canon_host, quic_hint.port);
net::AlternativeService alternative_service(
net::kProtoQUIC, "", static_cast<uint16_t>(quic_hint.alternate_port));
+ QuicVersionVector advertised_versions;
+ HttpNetworkSession::Params* params = context_->GetNetworkSessionParams();
+ if (params) {
+ advertised_versions = params->quic_supported_versions;
+ } else {
+ advertised_versions = CurrentSupportedVersions();
xunjieli 2017/06/09 16:41:55 suggestion for a follow-up: Consider add a prefix/
Zhongyi Shi 2017/06/16 00:24:04 Will do in a follow-up CL. Since this method is in
+ }
+
context_->http_server_properties()->SetAlternativeService(
- quic_server, alternative_service, base::Time::Max());
+ quic_server, alternative_service, base::Time::Max(),
+ advertised_versions);
}
}
« no previous file with comments | « no previous file | components/grpc_support/test/get_stream_engine.cc » ('j') | net/http/http_server_properties.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698