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

Unified Diff: components/cronet/ios/cronet_environment.mm

Issue 2901093004: Add and persist a new field in AlternativeServiceInfo to list QUIC verisons advertised (Closed)
Patch Set: fix cronet/grpc 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
Index: components/cronet/ios/cronet_environment.mm
diff --git a/components/cronet/ios/cronet_environment.mm b/components/cronet/ios/cronet_environment.mm
index b9d36033029076f79029ba6e18313fe2a8dae7ba..af08d69c519239e22098d8df3764eec92df1bad2 100644
--- a/components/cronet/ios/cronet_environment.mm
+++ b/components/cronet/ios/cronet_environment.mm
@@ -41,6 +41,7 @@
#include "net/log/net_log_capture_mode.h"
#include "net/log/write_to_file_net_log_observer.h"
#include "net/proxy/proxy_service.h"
+#include "net/quic/core/quic_versions.h"
#include "net/socket/ssl_client_socket.h"
#include "net/ssl/channel_id_service.h"
#include "net/url_request/http_user_agent_settings.h"
@@ -325,13 +326,23 @@ void CronetEnvironment::InitializeOnNetworkThread() {
std::unique_ptr<net::HttpServerProperties> http_server_properties(
new net::HttpServerPropertiesImpl());
+ QuicVersionVector advertised_versions;
+ HttpNetworkSession::Params* params =
+ context_builder.GetNetworkSessionParams();
+ if (params) {
+ advertised_versions = params->quic_supported_versions;
+ } else {
+ advertised_versions = CurrentSupportedVersions();
+ }
+
for (const auto& quic_hint : quic_hints_) {
net::AlternativeService alternative_service(net::kProtoQUIC, "",
quic_hint.port());
url::SchemeHostPort quic_hint_server("https", quic_hint.host(),
quic_hint.port());
- http_server_properties->SetAlternativeService(
- quic_hint_server, alternative_service, base::Time::Max());
+ http_server_properties->SetQuicAlternativeService(
Bence 2017/06/16 14:43:40 I believe this should also be called with an empty
Zhongyi Shi 2017/06/20 23:23:37 Acknowledged.
+ quic_hint_server, alternative_service, base::Time::Max(),
+ advertised_versions);
}
context_builder.SetHttpServerProperties(std::move(http_server_properties));

Powered by Google App Engine
This is Rietveld 408576698