| Index: components/cronet/android/java/src/org/chromium/net/UrlRequestContextConfig.java
|
| diff --git a/components/cronet/android/java/src/org/chromium/net/UrlRequestContextConfig.java b/components/cronet/android/java/src/org/chromium/net/UrlRequestContextConfig.java
|
| index 32b442ab51b02be94cfaf5cb632963db29ac3462..467719e1a3bbf1751dfa59564715c92e7ad5b922 100644
|
| --- a/components/cronet/android/java/src/org/chromium/net/UrlRequestContextConfig.java
|
| +++ b/components/cronet/android/java/src/org/chromium/net/UrlRequestContextConfig.java
|
| @@ -109,6 +109,41 @@ public class UrlRequestContextConfig {
|
| }
|
|
|
| /**
|
| + * String, key to use when authenticating with the proxy.
|
| + */
|
| + public UrlRequestContextConfig enableDataReductionProxy(String key) {
|
| + return (putString(
|
| + UrlRequestContextConfigList.DATA_REDUCTION_PROXY_KEY, key));
|
| + }
|
| +
|
| + /**
|
| + * Overrides Data Reduction Proxy configuration parameters with a primary
|
| + * proxy name, fallback proxy name, and a secure proxy check url. Proxies
|
| + * are specified as [scheme://]host[:port]. Used for testing.
|
| + * @param primaryProxy The primary data reduction proxy to use.
|
| + * @param fallbackProxy A fallback data reduction proxy to use.
|
| + * @param secureProxyCheckUrl A url to fetch to determine if using a secure
|
| + * proxy is allowed.
|
| + */
|
| + public UrlRequestContextConfig setDataReductionProxyOptions(
|
| + String primaryProxy,
|
| + String fallbackProxy,
|
| + String secureProxyCheckUrl) {
|
| + if (primaryProxy.isEmpty() || fallbackProxy.isEmpty()
|
| + || secureProxyCheckUrl.isEmpty()) {
|
| + throw new IllegalArgumentException(
|
| + "Primary and fallback proxies and check url must be set");
|
| + }
|
| + putString(UrlRequestContextConfigList.DATA_REDUCTION_PRIMARY_PROXY,
|
| + primaryProxy);
|
| + putString(UrlRequestContextConfigList.DATA_REDUCTION_FALLBACK_PROXY,
|
| + fallbackProxy);
|
| + putString(UrlRequestContextConfigList
|
| + .DATA_REDUCTION_SECURE_PROXY_CHECK_URL, secureProxyCheckUrl);
|
| + return this;
|
| + }
|
| +
|
| + /**
|
| * Enumeration, disable or enable cache in memory or on disk.
|
| */
|
| public enum HttpCache {
|
|
|