Chromium Code Reviews| Index: components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc |
| diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc |
| index 84dc2f56da7c8b4e675dd94c40f556498dd94755..a8303cea20385c2a2a749e12b363a13ff30dac4a 100644 |
| --- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc |
| +++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.cc |
| @@ -58,18 +58,12 @@ int64 GetExpirationTicks(int bypass_seconds) { |
| // The following method creates a string resembling the output of |
| // net::ProxyServer::ToURI(). |
| std::string GetNormalizedProxyString(const std::string& proxy_origin) { |
| - GURL proxy_url(proxy_origin); |
| - if (proxy_url.is_valid()) { |
| - net::HostPortPair proxy_host_port_pair = |
| - net::HostPortPair::FromURL(proxy_url); |
| - if (proxy_url.SchemeIs(url::kHttpScheme)) |
| - return proxy_host_port_pair.ToString(); |
| - |
| - return std::string(proxy_url.scheme()) + url::kStandardSchemeSeparator + |
| - proxy_host_port_pair.ToString(); |
| - } else { |
| + net::ProxyServer proxy_server = net::ProxyServer::FromURI( |
| + proxy_origin, net::ProxyServer::SCHEME_HTTP); |
|
bengr
2015/02/04 00:49:26
#include "net/proxy/proxy_server.h"
tbansal1
2015/02/04 22:49:11
Done.
|
| + if (proxy_server.is_valid()) |
| + return proxy_origin; |
| + else |
| return std::string(); |
| - } |
| } |
| // The following callbacks create a base::Value which contains information |