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 810ce12c030ec62c0250b60db4d05597c797c9e5..d72df91e44fb8e4ca3831fb253daa9a8a5f3b2f0 100644 |
--- a/components/cronet/android/java/src/org/chromium/net/UrlRequestContextConfig.java |
+++ b/components/cronet/android/java/src/org/chromium/net/UrlRequestContextConfig.java |
@@ -102,6 +102,18 @@ public class UrlRequestContextConfig { |
} |
/** |
+ * Boolean, enable Data Reduction Proxy if true. The key is used to |
+ * authenticate with the proxy. |
+ */ |
+ public UrlRequestContextConfig enableDataReductionProxy(boolean value, |
mmenke
2015/04/24 19:10:28
Wonder if we really need a value - if you don't wa
bengr
2015/04/24 21:13:51
Probably not necessary immediately, but I wanted e
mmenke
2015/04/24 21:17:59
Note that we don't support modifying the config af
bengr
2015/04/24 22:12:44
Done.
|
+ String key) { |
+ return (putBoolean(UrlRequestContextConfigList |
+ .ENABLE_DATA_REDUCTION_PROXY, value) |
+ .putString(UrlRequestContextConfigList |
+ .DATA_REDUCTION_PROXY_KEY, key)); |
+ } |
+ |
+ /** |
* Enumeration, disable or enable cache in memory or on disk. |
*/ |
public enum HttpCache { |
@@ -217,6 +229,28 @@ public class UrlRequestContextConfig { |
} |
/** |
+ * Overrides Data Reduction Proxy configuration parameters with a primary |
mmenke
2015/04/24 19:10:28
Overrides parameters implies we have defaults, but
bengr
2015/04/24 21:13:51
We do. They are hard coded in DRP code for now.
|
+ * proxy name, fallback proxy name, and a secure proxy check url. Proxies |
+ * are specified as scheme://host[:port]. |
+ * @param primaryProxy |
+ * @param fallbackProxy |
+ * @param secureProxyCheck |
+ */ |
mmenke
2015/04/24 19:10:28
Suggest moving this below the other DRP method (Kn
bengr
2015/04/24 21:13:51
Done.
|
+ public UrlRequestContextConfig setDataReductionProxyOptions( |
+ String primaryProxy, |
+ String fallbackProxy, |
+ String secureProxyCheckUrl) { |
mmenke
2015/04/24 19:10:28
IF any of these are empty throw an IllegalArgument
bengr
2015/04/24 21:13:51
Done.
|
+ return putString( |
+ UrlRequestContextConfigList.DATA_REDUCTION_PRIMARY_PROXY, |
+ primaryProxy) |
+ .putString(UrlRequestContextConfigList |
+ .DATA_REDUCTION_FALLBACK_PROXY, fallbackProxy) |
+ .putString(UrlRequestContextConfigList |
+ .DATA_REDUCTION_SECURE_PROXY_CHECK_URL, |
+ secureProxyCheckUrl); |
mmenke
2015/04/24 19:10:28
Think this would be more legibly as just 3 indepen
bengr
2015/04/24 21:13:51
Done.
|
+ } |
+ |
+ /** |
* Get JSON string representation of the config. |
*/ |
@Override |