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

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

Issue 1455333004: Add "q=preview" directive on main frame requests on poor networks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@deciderAddLoFiHeader
Patch Set: limit flag channels Created 5 years, 1 month 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_switches.cc
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc
index 2e8306454093433af0ddfbcf47b6cc3f2e067cbd..028f84f84e2eaa24b5249b2fb239e61f66b68f0b 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_switches.cc
@@ -7,9 +7,16 @@
namespace data_reduction_proxy {
namespace switches {
+// Clear data savings on Chrome startup.
+const char kClearDataReductionProxyDataSavings[] =
+ "clear-data-reduction-proxy-data-savings";
+
// The origin of the data reduction proxy.
const char kDataReductionProxy[] = "spdy-proxy-auth-origin";
+// The URL from which to retrieve the Data Reduction Proxy configuration.
+const char kDataReductionProxyConfigURL[] = "data-reduction-proxy-config-url";
+
// The origin of the data reduction proxy dev.
const char kDataReductionProxyDev[] = "spdy-proxy-dev-auth-origin";
@@ -21,9 +28,28 @@ const char kDataReductionProxyExperiment[] = "data-reduction-proxy-experiment";
// The origin of the data reduction proxy fallback.
const char kDataReductionProxyFallback[] = "spdy-proxy-auth-fallback";
+// The semicolon-separated list of proxy server URIs to override the list of
+// HTTP proxies returned by the Data Saver API. If set, the value of this flag
+// overrides any proxies specified by other flags like --spdy-proxy-auth-origin
+// or --spdy-proxy-auth-fallback. If the URI omits a scheme, then the proxy
+// server scheme defaults to HTTP, and if the port is omitted then the default
+// port for that scheme is used. E.g. "http://foo.net:80", "http://foo.net",
+// "foo.net:80", and "foo.net" are all equivalent.
+const char kDataReductionProxyHttpProxies[] =
+ "data-reduction-proxy-http-proxies";
+
// A test key for data reduction proxy authentication.
const char kDataReductionProxyKey[] = "spdy-proxy-auth-value";
+// The mode for Data Reduction Proxy Lo-Fi. The various modes are always-on,
+// cellular-only, slow connections only and disabled.
+const char kDataReductionProxyLoFi[] = "data-reduction-proxy-lo-fi";
+const char kDataReductionProxyLoFiValueAlwaysOn[] = "always-on";
+const char kDataReductionProxyLoFiValueCellularOnly[] = "cellular-only";
+const char kDataReductionProxyLoFiValueDisabled[] = "disabled";
+const char kDataReductionProxyLoFiValueSlowConnectionsOnly[] =
+ "slow-connections-only";
+
// Sets a secure proxy check URL to test before committing to using the Data
// Reduction Proxy. Note this check does not go through the Data Reduction
// Proxy.
@@ -42,27 +68,10 @@ const char kDataReductionProxyWarmupURL[] = "data-reduction-proxy-warmup-url";
// The origin of the data reduction SSL proxy.
const char kDataReductionSSLProxy[] = "data-reduction-ssl-proxy";
-// The mode for Data Reduction Proxy Lo-Fi. The various modes are always-on,
-// cellular-only, slow connections only and disabled.
-const char kDataReductionProxyLoFi[] = "data-reduction-proxy-lo-fi";
-const char kDataReductionProxyLoFiValueAlwaysOn[] = "always-on";
-const char kDataReductionProxyLoFiValueCellularOnly[] = "cellular-only";
-const char kDataReductionProxyLoFiValueDisabled[] = "disabled";
-const char kDataReductionProxyLoFiValueSlowConnectionsOnly[] =
- "slow-connections-only";
-
// Disables the origin of the data reduction proxy dev.
const char kDisableDataReductionProxyDev[] =
"disable-spdy-proxy-dev-auth-origin";
-// Enables the origin of the data reduction proxy dev.
-const char kEnableDataReductionProxyDev[] =
- "enable-spdy-proxy-dev-auth-origin";
-
-// Enables the origin of the carrier test data reduction proxy.
-const char kEnableDataReductionProxyCarrierTest[] =
- "enable-data-reduction-proxy-carrier-test";
-
// Enable the data reduction proxy.
const char kEnableDataReductionProxy[] = "enable-spdy-proxy-auth";
@@ -70,26 +79,22 @@ const char kEnableDataReductionProxy[] = "enable-spdy-proxy-auth";
const char kEnableDataReductionProxyBypassWarning[] =
"enable-data-reduction-proxy-bypass-warning";
-// Clear data savings on Chrome startup.
-const char kClearDataReductionProxyDataSavings[] =
- "clear-data-reduction-proxy-data-savings";
+// Enables the origin of the carrier test data reduction proxy.
+const char kEnableDataReductionProxyCarrierTest[] =
+ "enable-data-reduction-proxy-carrier-test";
// Enable the data reduction proxy config client.
const char kEnableDataReductionProxyConfigClient[] =
"enable-data-reduction-proxy-config-client";
-// The URL from which to retrieve the Data Reduction Proxy configuration.
-const char kDataReductionProxyConfigURL[] = "data-reduction-proxy-config-url";
+// Enables the origin of the data reduction proxy dev.
+const char kEnableDataReductionProxyDev[] = "enable-spdy-proxy-dev-auth-origin";
-// The semicolon-separated list of proxy server URIs to override the list of
-// HTTP proxies returned by the Data Saver API. If set, the value of this flag
-// overrides any proxies specified by other flags like --spdy-proxy-auth-origin
-// or --spdy-proxy-auth-fallback. If the URI omits a scheme, then the proxy
-// server scheme defaults to HTTP, and if the port is omitted then the default
-// port for that scheme is used. E.g. "http://foo.net:80", "http://foo.net",
-// "foo.net:80", and "foo.net" are all equivalent.
-const char kDataReductionProxyHttpProxies[] =
- "data-reduction-proxy-http-proxies";
+// Enables preview mode for Lo-Fi. This means a preview should be requested
+// instead of placeholders whenever Lo-Fi mode is on. Lo-Fi must also be enabled
+// via a flag or field trial.
+const char kEnableDataReductionProxyLoFiPreview[] =
+ "enable-data-reduction-proxy-lo-fi-preview";
} // namespace switches
} // namespace data_reduction_proxy

Powered by Google App Engine
This is Rietveld 408576698