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

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

Issue 2864333003: Use the Previews Black List for server previews (Closed)
Patch Set: . Created 3 years, 7 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
« no previous file with comments | « components/data_reduction_proxy/core/common/data_reduction_proxy_params.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5e3cd12f13414510cf584f57c1cb057cd304e8ac..9792ab96ea48836a1f50cb7997b3f6d7864e7eec 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
@@ -45,6 +45,9 @@ const char kLitePageFallbackFieldTrial[] =
"DataCompressionProxyLitePageFallback";
const char kLoFiFlagFieldTrial[] = "DataCompressionProxyLoFiFlag";
+const char kBlackListTransitionFieldTrial[] =
+ "DataReductionProxyPreviewsBlackListTransition";
+
const char kTrustedSpdyProxyFieldTrialName[] = "DataReductionTrustedSpdyProxy";
// Default URL for retrieving the Data Reduction Proxy configuration.
@@ -60,7 +63,7 @@ const char kServerExperimentsFieldTrial[] =
"DataReductionProxyServerExperiments";
// LitePage black list version.
-const char kLitePageBlacklistVersion[] = "lite-page-blacklist-version";
+const char kLitePageBlackListVersion[] = "lite-page-blacklist-version";
bool IsIncludedInFieldTrial(const std::string& name) {
return base::StartsWith(FieldTrialList::FindFullName(name), kEnabled,
@@ -271,6 +274,12 @@ bool IsConfigClientEnabled() {
kDisabled, base::CompareCase::SENSITIVE);
}
+bool IsBlackListEnabledForServerPreviews() {
+ return base::StartsWith(
+ base::FieldTrialList::FindFullName(kBlackListTransitionFieldTrial),
+ kEnabled, base::CompareCase::SENSITIVE);
+}
+
GURL GetConfigServiceURL() {
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
std::string url;
@@ -319,7 +328,7 @@ bool ShouldForceEnableDataReductionProxy() {
int LitePageVersion() {
return GetFieldTrialParameterAsInteger(
data_reduction_proxy::params::GetLoFiFieldTrialName(),
- kLitePageBlacklistVersion, 0, 0);
+ kLitePageBlackListVersion, 0, 0);
}
int GetFieldTrialParameterAsInteger(const std::string& group,
« no previous file with comments | « components/data_reduction_proxy/core/common/data_reduction_proxy_params.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698