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

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: Addressed bengr's changes 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
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() &&
bengr 2014/10/29 23:41:26 Why is this now necessary?
Not at Google. Contact bengr 2014/10/30 00:05:03 Discussed in person. Was always needed for correct
+ 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;

Powered by Google App Engine
This is Rietveld 408576698