Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(520)

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc

Issue 2566773002: Add Brotli to Accept Encoding header for secure DRP requests (Closed)
Patch Set: Fix test Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc
index 84f14ecf4198c00414f0d61c1c203c517ce6ae95..b5cb91740cd8926f96cffa3e4843ad8866c61451 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_params.cc
@@ -230,6 +230,16 @@ bool IsZeroRttQuicEnabled() {
params, "enable_zero_rtt", "false") == "true";
}
+bool IsBrotliAcceptEncodingEnabled() {
+ // Brotli encoding is enabled by default since the data reduction proxy server
+ // controls when to serve Brotli encoded content. It can be disabled in
+ // Chromium only if Chromium belongs to a field trial group whose name starts
+ // with "Disabled".
+ return !base::StartsWith(base::FieldTrialList::FindFullName(
+ "DataReductionProxyBrotliAcceptEncoding"),
+ kDisabled, base::CompareCase::SENSITIVE);
+}
+
bool IsConfigClientEnabled() {
// Config client is enabled by default. It can be disabled only if Chromium
// belongs to a field trial group whose name starts with "Disabled".

Powered by Google App Engine
This is Rietveld 408576698