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

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

Issue 669163003: Handle disabling data reduction proxy for all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head Created 6 years, 2 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 24ae0085b2de7ff912435c77eb7cfe64a8ec3484..60b6b49f190f3cb2946a72793355e455050b7b4d 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
@@ -315,7 +315,8 @@ bool DataReductionProxyParams::WasDataReductionProxyUsed(
bool DataReductionProxyParams::IsDataReductionProxy(
const net::HostPortPair& host_port_pair,
DataReductionProxyTypeInfo* proxy_info) const {
- if (net::HostPortPair::FromURL(origin()).Equals(host_port_pair)) {
+ if (allowed() &&
+ net::HostPortPair::FromURL(origin()).Equals(host_port_pair)) {
if (proxy_info) {
proxy_info->proxy_servers.first = origin();
if (fallback_allowed())
@@ -333,7 +334,8 @@ bool DataReductionProxyParams::IsDataReductionProxy(
}
return true;
}
- if (net::HostPortPair::FromURL(alt_origin()).Equals(host_port_pair)) {
+ if (alternative_allowed() &&
+ net::HostPortPair::FromURL(alt_origin()).Equals(host_port_pair)) {
if (proxy_info) {
proxy_info->proxy_servers.first = alt_origin();
proxy_info->is_alternative = true;
« 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