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

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

Issue 2642793005: Create a Lite Page bit for previews and fallback to Lo-Fi (Closed)
Patch Set: remove unused frame_messages.h code Created 3 years, 10 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 52f7982699d94f57d7f0f2be4442aba806312e9a..ac08fb10e9dd25abf5e23f677714624275d659ce 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
@@ -41,6 +41,8 @@ const char kAndroidOneIdentifier[] = "sprout";
const char kQuicFieldTrial[] = "DataReductionProxyUseQuic";
const char kLoFiFieldTrial[] = "DataCompressionProxyLoFi";
+const char kLitePageFallbackFieldTrial[] =
+ "DataCompressionProxyLitePageFallback";
const char kLoFiFlagFieldTrial[] = "DataCompressionProxyLoFiFlag";
const char kTrustedSpdyProxyFieldTrialName[] = "DataReductionTrustedSpdyProxy";
@@ -104,6 +106,10 @@ const char* GetLoFiFieldTrialName() {
return kLoFiFieldTrial;
}
+const char* GetLitePageFallbackFieldTrialName() {
+ return kLitePageFallbackFieldTrial;
+}
+
const char* GetLoFiFlagFieldTrialName() {
return kLoFiFlagFieldTrial;
}
@@ -125,6 +131,11 @@ bool IsIncludedInLitePageFieldTrial() {
kLitePage, base::CompareCase::SENSITIVE);
}
+bool IsLitePageFallbackEnabled() {
+ return IsIncludedInFieldTrial(GetLitePageFallbackFieldTrialName()) ||
+ (IsLoFiOnViaFlags() && AreLitePagesEnabledViaFlags());
+}
+
bool IsIncludedInServerExperimentsFieldTrial() {
return !base::CommandLine::ForCurrentProcess()->HasSwitch(
data_reduction_proxy::switches::

Powered by Google App Engine
This is Rietveld 408576698