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

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

Issue 1363673004: [DRP] Consistently use LoFi for an entire page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing tbansal comments 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/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 b4c22651c6601fff180e4b47963786740bf480be..88372635ac31f8bfe1bfbdb0af973972496ef9eb 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
@@ -25,6 +25,7 @@ using base::FieldTrialList;
namespace {
const char kEnabled[] = "Enabled";
+const char kControl[] = "Control";
const char kDefaultSpdyOrigin[] = "https://proxy.googlezip.net:443";
const char kDefaultQuicOrigin[] = "quic://proxy.googlezip.net:443";
// A one-off change, until the Data Reduction Proxy configuration service is
@@ -79,6 +80,14 @@ std::string GetLoFiFlagFieldTrialName() {
return kLoFiFlagFieldTrial;
}
+bool IsIncludedInLoFiEnabledFieldTrial() {
+ return FieldTrialList::FindFullName(GetLoFiFieldTrialName()) == kEnabled;
+}
+
+bool IsIncludedInLoFiControlFieldTrial() {
+ return FieldTrialList::FindFullName(GetLoFiFieldTrialName()) == kControl;
+}
+
bool IsLoFiAlwaysOnViaFlags() {
const std::string& lo_fi_value =
base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(

Powered by Google App Engine
This is Rietveld 408576698