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

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

Issue 1380933002: Set exp id in the CP header if user is in Lo-Fi control. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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_config.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
index df78cf8e6d81a0b615fa2a279522761ae94e5c67..c24213a709f610bc9c564d8644e9144325efaf6e 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
@@ -493,6 +493,24 @@ bool DataReductionProxyConfig::ShouldUseLoFiHeaderForRequests() const {
return ShouldUseLoFiHeaderForRequests(lofi_status_);
}
+bool DataReductionProxyConfig::IsInLoFiControlExperiment() const {
+ switch (lofi_status_) {
+ case LOFI_STATUS_OFF:
+ case LOFI_STATUS_TEMPORARILY_OFF:
+ case LOFI_STATUS_INACTIVE_CONTROL:
+ case LOFI_STATUS_INACTIVE:
+ case LOFI_STATUS_ACTIVE_FROM_FLAGS:
+ case LOFI_STATUS_ACTIVE:
+ return false;
+ case LOFI_STATUS_ACTIVE_CONTROL:
+ DCHECK(IsIncludedInLoFiControlFieldTrial());
+ return true;
+ default:
+ NOTREACHED() << lofi_status_;
+ }
+ return false;
+}
+
void DataReductionProxyConfig::PopulateAutoLoFiParams() {
std::string field_trial = params::GetLoFiFieldTrialName();

Powered by Google App Engine
This is Rietveld 408576698