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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc

Issue 2062963003: Add a flag to disable server experiments in DRP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: kundaji comments Created 4 years, 6 months 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/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 bd91dacedb7b1ff58024a3ffb7c300b60d3db8b5..91397846bb53c36587cf591ed52b7926be1d1342 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
@@ -143,14 +143,16 @@ void DataReductionProxyRequestOptions::UpdateExperiments() {
experiments_.push_back(experiment_tokenizer.token());
}
} else {
- AddExperimentFromFieldTrial();
+ AddServerExperimentFromFieldTrial();
}
RegenerateRequestHeaderValue();
}
-void DataReductionProxyRequestOptions::AddExperimentFromFieldTrial() {
- std::string server_experiment = variations::GetVariationParamValue(
- params::GetServerExperimentsFieldTrialName(), "exp");
+void DataReductionProxyRequestOptions::AddServerExperimentFromFieldTrial() {
+ if (!params::IsIncludedInServerExperimentsFieldTrial())
+ return;
+ const std::string server_experiment = variations::GetVariationParamValue(
+ params::GetServerExperimentsFieldTrialName(), kExperimentsOption);
if (!server_experiment.empty())
experiments_.push_back(server_experiment);
}

Powered by Google App Engine
This is Rietveld 408576698