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

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: 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/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 e8e65b4f1015fadeeceb35b90f27fd5f11111618..6e48c5b0b19b1dee3ab97a6930cbd16304edbda4 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"
@@ -759,8 +760,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));
- context_->http_server_properties()->SetAlternativeService(
- quic_server, alternative_service, base::Time::Max());
+ QuicVersionVector advertised_versions;
+ HttpNetworkSession::Params* params = context_->GetNetworkSessionParams();
+ if (params) {
xunjieli 2017/06/16 14:43:56 |params| should be always non-null, right? Can you
Zhongyi Shi 2017/06/20 23:23:37 Done.
+ advertised_versions = params->quic_supported_versions;
+ } else {
+ advertised_versions = CurrentSupportedVersions();
+ }
+
+ context_->http_server_properties()->SetQuicAlternativeService(
Bence 2017/06/16 14:43:40 I believe this should be called with an empty Quic
Zhongyi Shi 2017/06/20 23:23:37 Setting versions here doesn't have behavioral diff
Bence 2017/06/21 12:39:25 What happens if one version of Chrome supports QUI
Zhongyi Shi 2017/06/21 21:01:32 Discussed offline. I have confirmed with xunjieli@
Zhongyi Shi 2017/06/26 22:23:24 As I realized version advertisement is optional. I
+ quic_server, alternative_service, base::Time::Max(),
+ advertised_versions);
}
}
« no previous file with comments | « no previous file | components/cronet/ios/cronet_environment.mm » ('j') | components/cronet/ios/cronet_environment.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698