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

Unified Diff: components/cronet/url_request_context_config.cc

Issue 544223003: Add SetSupportsQuic method to explicitly specify server that supports QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 6 years, 3 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/url_request_context_config.cc
diff --git a/components/cronet/url_request_context_config.cc b/components/cronet/url_request_context_config.cc
index 11f2def56ce009bdc6805ab2cc8c30fc711ecf89..e76bba3b1bb6168fc3b0c5df5811f0e3bb46151c 100644
--- a/components/cronet/url_request_context_config.cc
+++ b/components/cronet/url_request_context_config.cc
@@ -12,6 +12,25 @@ namespace cronet {
#include "components/cronet/url_request_context_config_list.h"
#undef DEFINE_CONTEXT_CONFIG
+URLRequestContextConfig::QuicHint::QuicHint() {
+}
+
+URLRequestContextConfig::QuicHint::~QuicHint() {
+}
+
+// static
+void URLRequestContextConfig::QuicHint::RegisterJSONConverter(
+ base::JSONValueConverter<URLRequestContextConfig::QuicHint>* converter) {
+ converter->RegisterStringField(REQUEST_CONTEXT_CONFIG_QUIC_HINT_HOST,
+ &URLRequestContextConfig::QuicHint::host);
+ converter->RegisterIntField(
+ REQUEST_CONTEXT_CONFIG_QUIC_HINT_PORT,
+ &URLRequestContextConfig::QuicHint::port);
+ converter->RegisterIntField(
+ REQUEST_CONTEXT_CONFIG_QUIC_HINT_ALT_PORT,
+ &URLRequestContextConfig::QuicHint::alternate_port);
+}
+
URLRequestContextConfig::URLRequestContextConfig() {
}
@@ -54,6 +73,8 @@ void URLRequestContextConfig::RegisterJSONConverter(
&URLRequestContextConfig::http_cache_max_size);
converter->RegisterStringField(REQUEST_CONTEXT_CONFIG_STORAGE_PATH,
&URLRequestContextConfig::storage_path);
+ converter->RegisterRepeatedMessage(REQUEST_CONTEXT_CONFIG_QUIC_HINTS,
+ &URLRequestContextConfig::quic_hints);
}
} // namespace cronet

Powered by Google App Engine
This is Rietveld 408576698