#include <string>
#include "base/json/json_value_converter.h"
+#include "base/macros.h"
+#include "base/memory/scoped_vector.h"
namespace net {
class URLRequestContextBuilder;
// 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);
+
+ // Host name of the server that supports QUIC.
+ std::string host;
+ // Port of the server that supports QUIC.
+ int port;
+ // Alternate protocol port.
+ int alternate_port;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(QuicHint);
+ };
+
URLRequestContextConfig();
~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