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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_params.cc

Issue 338723002: Add probe to warm data reduction proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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/browser/data_reduction_proxy_params.cc
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc
index 16e0d20c6033e603005177f549a7b3a2c58a1cc4..d3a38903d5739f8e4695bfed4a11d3003fd3e191 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_params.cc
@@ -199,6 +199,8 @@ void DataReductionProxyParams::InitWithoutChecks() {
std::string probe_url = command_line.GetSwitchValueASCII(
switches::kDataReductionProxyProbeURL);
+ std::string warmup_url = command_line.GetSwitchValueASCII(
+ switches::kDataReductionProxyWarmupURL);
// Set from preprocessor constants those params that are not specified on the
// command line.
@@ -216,6 +218,8 @@ void DataReductionProxyParams::InitWithoutChecks() {
alt_fallback_origin = GetDefaultAltFallbackOrigin();
if (probe_url.empty())
probe_url = GetDefaultProbeURL();
+ if (warmup_url.empty())
+ warmup_url = GetDefaultWarmupURL();
origin_ = GURL(origin);
fallback_origin_ = GURL(fallback_origin);
@@ -223,6 +227,7 @@ void DataReductionProxyParams::InitWithoutChecks() {
alt_origin_ = GURL(alt_origin);
alt_fallback_origin_ = GURL(alt_fallback_origin);
probe_url_ = GURL(probe_url);
+ warmup_url_ = GURL(warmup_url);
}
@@ -342,4 +347,11 @@ std::string DataReductionProxyParams::GetDefaultProbeURL() const {
return std::string();
}
+std::string DataReductionProxyParams::GetDefaultWarmupURL() const {
+#if defined(DATA_REDUCTION_PROXY_WARMUP_URL)
+ return DATA_REDUCTION_PROXY_WARMUP_URL;
+#endif
+ return std::string();
+}
+
} // namespace data_reduction_proxy

Powered by Google App Engine
This is Rietveld 408576698