diff options
author | mef@chromium.org <mef@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-17 00:09:51 +0000 |
---|---|---|
committer | mef@chromium.org <mef@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-17 00:09:51 +0000 |
commit | 94de3e05dbde532c58791bac7f15266d896d3663 (patch) | |
tree | 4cfae92f2a2f3d1ff41bd36c424ce89c59db8383 /components/cronet/url_request_context_config.h | |
parent | c4b47790aa56e82303b224dcdb9be8b5dd79ed80 (diff) | |
download | chromium_src-94de3e05dbde532c58791bac7f15266d896d3663.zip chromium_src-94de3e05dbde532c58791bac7f15266d896d3663.tar.gz chromium_src-94de3e05dbde532c58791bac7f15266d896d3663.tar.bz2 |
Added Cronet HttpUrlRequestFactoryConfig.
BUG=354143
Review URL: https://codereview.chromium.org/260553002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/cronet/url_request_context_config.h')
-rw-r--r-- | components/cronet/url_request_context_config.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/components/cronet/url_request_context_config.h b/components/cronet/url_request_context_config.h new file mode 100644 index 0000000..b295d02 --- /dev/null +++ b/components/cronet/url_request_context_config.h @@ -0,0 +1,47 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ +#define COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ + +#include <string> + +#include "base/json/json_value_converter.h" + +namespace net { +class URLRequestContextBuilder; +} // namespace net + +namespace cronet { + +// Common configuration parameters used by Cronet to configure +// URLRequestContext. Can be parsed from JSON string passed through JNI. +struct URLRequestContextConfig { + URLRequestContextConfig(); + ~URLRequestContextConfig(); + + // Configure |context_builder| based on |this|. + void ConfigureURLRequestContextBuilder( + net::URLRequestContextBuilder* context_builder); + + // Register |converter| for use in converter.Convert(). + static void RegisterJSONConverter( + base::JSONValueConverter<URLRequestContextConfig>* converter); + + // Enable QUIC. + bool enable_quic; + // Enable SPDY. + bool enable_spdy; + // Type of http cache: "HTTP_CACHE_DISABLED", "HTTP_CACHE_DISK" or + // "HTTP_CACHE_IN_MEMORY". + std::string http_cache; + // Max size of http cache in bytes. + int http_cache_max_size; + // Storage path for http cache and cookie storage. + std::string storage_path; +}; + +} // namespace cronet + +#endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ |