Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / components / cronet / url_request_context_config.h
blobb295d02fb98fbac12c8731d8c81805dcf99b5fb2
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
6 #define COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
8 #include <string>
10 #include "base/json/json_value_converter.h"
12 namespace net {
13 class URLRequestContextBuilder;
14 } // namespace net
16 namespace cronet {
18 // Common configuration parameters used by Cronet to configure
19 // URLRequestContext. Can be parsed from JSON string passed through JNI.
20 struct URLRequestContextConfig {
21 URLRequestContextConfig();
22 ~URLRequestContextConfig();
24 // Configure |context_builder| based on |this|.
25 void ConfigureURLRequestContextBuilder(
26 net::URLRequestContextBuilder* context_builder);
28 // Register |converter| for use in converter.Convert().
29 static void RegisterJSONConverter(
30 base::JSONValueConverter<URLRequestContextConfig>* converter);
32 // Enable QUIC.
33 bool enable_quic;
34 // Enable SPDY.
35 bool enable_spdy;
36 // Type of http cache: "HTTP_CACHE_DISABLED", "HTTP_CACHE_DISK" or
37 // "HTTP_CACHE_IN_MEMORY".
38 std::string http_cache;
39 // Max size of http cache in bytes.
40 int http_cache_max_size;
41 // Storage path for http cache and cookie storage.
42 std::string storage_path;
45 } // namespace cronet
47 #endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_