[Cronet] Enable Brotli
- removes the compile time flag to disable brotli when building Cronet.
- adds an API to enable Brotli on CronetEngine.
- adds three basic java tests in BrotliTest.java
BUG=710633
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester
Review-Url: https://codereview.chromium.org/2805053005
Cr-Commit-Position: refs/heads/master@{#465216}
diff --git a/components/cronet/url_request_context_config.h b/components/cronet/url_request_context_config.h
index 69e1b80..ce398236 100644
--- a/components/cronet/url_request_context_config.h
+++ b/components/cronet/url_request_context_config.h
@@ -87,6 +87,8 @@
bool enable_spdy,
// Enable SDCH.
bool enable_sdch,
+ // Enable Brotli.
+ bool enable_brotli,
// Type of http cache.
HttpCacheType http_cache,
// Max size of http cache in bytes.
@@ -132,6 +134,8 @@
const bool enable_spdy;
// Enable SDCH.
const bool enable_sdch;
+ // Enable Brotli.
+ const bool enable_brotli;
// Type of http cache.
const HttpCacheType http_cache;
// Max size of http cache in bytes.
@@ -201,6 +205,8 @@
bool enable_spdy = true;
// Enable SDCH.
bool enable_sdch = false;
+ // Enable Brotli.
+ bool enable_brotli = false;
// Type of http cache.
URLRequestContextConfig::HttpCacheType http_cache =
URLRequestContextConfig::DISABLED;