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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_params.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/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 b5f0a5f12bb145064b9acbadc764d8a07435ef54..c66a27ca27bb6f0c8a486616aa4b0cfb1d9147a8 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
@@ -104,9 +104,17 @@ bool IsIncludedInLoFiPreviewFieldTrial() {
0;
}
+bool IsIncludedInServerExperimentsFieldTrial() {
+ return !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ data_reduction_proxy::switches::
+ kDataReductionProxyServerExperimentsDisabled) &&
+ FieldTrialList::FindFullName(kServerExperimentsFieldTrial)
+ .find(kDisabled) != 0;
+}
bool IsIncludedInTamperDetectionExperiment() {
- return FieldTrialList::FindFullName("DataReductionProxyServerExperiments")
- .find("TamperDetection_Enabled") == 0;
+ return IsIncludedInServerExperimentsFieldTrial() &&
+ FieldTrialList::FindFullName(kServerExperimentsFieldTrial)
+ .find("TamperDetection_Enabled") == 0;
}
bool IsLoFiOnViaFlags() {

Powered by Google App Engine
This is Rietveld 408576698