Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc |
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc |
index 470a67597e5b5c075b4e4a3cbdfcbc1826ad0979..1271e4e66fa616ed9ab9fd0053c3c634f45f36db 100644 |
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc |
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc |
@@ -17,6 +17,7 @@ |
#include "base/time/time.h" |
#include "build/build_config.h" |
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_config.h" |
+#include "components/data_reduction_proxy/core/common/data_reduction_proxy_features.h" |
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h" |
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h" |
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_switches.h" |
@@ -106,6 +107,7 @@ void DataReductionProxyRequestOptions::UpdateExperiments() { |
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
data_reduction_proxy::switches::kDataReductionProxyExperiment); |
+ // The command line override takes precedence over other "exp" directives. |
if (!experiments.empty()) { |
base::StringTokenizer experiment_tokenizer(experiments, ", "); |
experiment_tokenizer.set_quote_chars("\""); |
@@ -113,7 +115,14 @@ void DataReductionProxyRequestOptions::UpdateExperiments() { |
if (!experiment_tokenizer.token().empty()) |
experiments_.push_back(experiment_tokenizer.token()); |
} |
+ } else if (base::FeatureList::IsEnabled( |
+ features::kDataReductionProxyAlternativeBackEnd)) { |
+ experiments_.push_back(chrome_proxy_alternative_back_end()); |
+ } else if (params::AreLitePagesEnabledViaFlags()) { |
+ experiments_.push_back(chrome_proxy_lite_page_ignore_blacklist()); |
} else { |
+ // If no other "exp" directive is forced by flags, add the field trial |
+ // value. |
AddServerExperimentFromFieldTrial(); |
} |