Index: components/cronet/url_request_context_config.h |
diff --git a/components/cronet/url_request_context_config.h b/components/cronet/url_request_context_config.h |
index b295d02fb98fbac12c8731d8c81805dcf99b5fb2..d29b304b0f82a11310f78c01c8918afafe80358e 100644 |
--- a/components/cronet/url_request_context_config.h |
+++ b/components/cronet/url_request_context_config.h |
@@ -8,6 +8,8 @@ |
#include <string> |
#include "base/json/json_value_converter.h" |
+#include "base/macros.h" |
+#include "base/memory/scoped_vector.h" |
namespace net { |
class URLRequestContextBuilder; |
@@ -18,6 +20,24 @@ namespace cronet { |
// Common configuration parameters used by Cronet to configure |
// URLRequestContext. Can be parsed from JSON string passed through JNI. |
struct URLRequestContextConfig { |
+ // App-provided hint that server supports QUIC. |
+ struct QuicHint { |
+ QuicHint(); |
+ ~QuicHint(); |
+ |
+ // Register |converter| for use in converter.Convert(). |
+ static void RegisterJSONConverter( |
+ base::JSONValueConverter<QuicHint>* converter); |
+ |
+ // URL of the server that supports QUIC. |
+ std::string server; |
Ryan Hamilton
2014/09/10 20:58:19
If this is a URL it seems like the type should be
mmenke
2014/09/10 21:10:18
This is created automatically from a JSON-formatte
|
+ // Alternate protocol port. |
+ int alternate_port; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(QuicHint); |
+ }; |
+ |
URLRequestContextConfig(); |
~URLRequestContextConfig(); |
@@ -40,6 +60,11 @@ struct URLRequestContextConfig { |
int http_cache_max_size; |
// Storage path for http cache and cookie storage. |
std::string storage_path; |
+ // App-provided list of servers that support QUIC. |
+ ScopedVector<QuicHint> quic_hints; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig); |
}; |
} // namespace cronet |