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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc

Issue 2424973002: Only match host port pair when determining if a proxy is a data reduction proxy (Closed)
Patch Set: ps Created 4 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 | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
index 78f2c5982d9d1639c1d29c82027e00352c30fa27..67d424f5e64439b15b209e1b8efcae3aeea90c42 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc
@@ -353,8 +353,14 @@ bool DataReductionProxyConfig::IsDataReductionProxy(
const std::vector<net::ProxyServer>& proxy_list =
config_values_->proxies_for_http();
RyanSturm 2016/10/17 18:57:22 proxies_for_http() frustrates me. Either we have a
tbansal1 2016/10/17 19:06:52 We used to have proxies_for_https() in the past fo
+
+ net::HostPortPair host_port_pair = proxy_server.host_port_pair();
const auto proxy_it =
- std::find(proxy_list.begin(), proxy_list.end(), proxy_server);
+ std::find_if(proxy_list.begin(), proxy_list.end(),
+ [&host_port_pair](const net::ProxyServer& proxy) {
RyanSturm 2016/10/17 18:57:22 nit: I don't care if you change this or not, but s
tbansal1 2016/10/17 19:06:52 Acknowledged.
+ return proxy.is_valid() &&
+ proxy.host_port_pair().Equals(host_port_pair);
+ });
if (proxy_it != proxy_list.end()) {
if (proxy_info) {
« no previous file with comments | « no previous file | components/data_reduction_proxy/core/browser/data_reduction_proxy_config_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698