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

Unified Diff: components/cronet/url_request_context_config.h

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: Address review comments. 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.h
diff --git a/components/cronet/url_request_context_config.h b/components/cronet/url_request_context_config.h
index b295d02fb98fbac12c8731d8c81805dcf99b5fb2..d7400d560f4a630a42e4f6c515e4898e6ea3def9 100644
--- a/components/cronet/url_request_context_config.h
+++ b/components/cronet/url_request_context_config.h
@@ -18,6 +18,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;
+ // Alternate protocol port.
+ int alternate_port;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(QuicHint);
+ };
+
URLRequestContextConfig();
~URLRequestContextConfig();
@@ -40,6 +58,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;
mmenke 2014/09/10 18:21:27 Should probably include the header for this
mef 2014/09/10 20:18:48 Done.
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig);
mmenke 2014/09/10 18:21:27 include macros.h
mef 2014/09/10 20:18:48 Done.
};
} // namespace cronet

Powered by Google App Engine
This is Rietveld 408576698