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

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

Issue 286013002: Added alternative configuration for the data reduction proxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK fix Created 6 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
Index: components/data_reduction_proxy/browser/data_reduction_proxy_metrics.cc
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_metrics.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_metrics.cc
index 3ecef8a0704c590443fe527a2288750366425e80..7ad2809b68667ff87d3ead1ac6c846fa4c1d7d13 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_metrics.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_metrics.cc
@@ -301,8 +301,14 @@ class DailyDataSavingUpdate {
// the request is bypassed by more than one proxy, delay_seconds returns
// shortest delay.
bool IsBypassRequest(const net::URLRequest* request, int64* delay_seconds) {
- DataReductionProxySettings::DataReductionProxyList proxies =
- DataReductionProxySettings::GetDataReductionProxies();
+ // TODO(bengr): Add support for other data reduction proxy configurations.
+#if defined(SPDY_PROXY_AUTH_ORIGIN)
+ DataReductionProxyParams params(
+ DataReductionProxyParams::kAllowed |
+ DataReductionProxyParams::kFallbackAllowed |
+ DataReductionProxyParams::kPromoAllowed);
+ DataReductionProxyParams::DataReductionProxyList proxies =
+ params.GetAllowedProxies();
if (proxies.size() == 0)
return false;
@@ -335,6 +341,9 @@ bool IsBypassRequest(const net::URLRequest* request, int64* delay_seconds) {
if (delay_seconds != NULL)
*delay_seconds = shortest_delay;
return true;
+#else
+ return false;
+#endif
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698