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

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

Issue 863203009: Store Proxy Servers as proxy servers and not GURLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/browser/data_reduction_proxy_interceptor_unittest.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
index 26de12c3044d10d489dec033508ae65eea8865db..d496577b33148e6238cffa57792d9b779e3a98f9 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor_unittest.cc
@@ -83,7 +83,7 @@ class TestURLRequestContextWithDataReductionProxy
TestURLRequestContextWithDataReductionProxy(DataReductionProxyParams* params,
net::NetworkDelegate* delegate)
: net::TestURLRequestContext(true) {
- std::string proxy = params->origin().spec();
+ std::string proxy = params->origin().ToURI();
bengr 2015/02/04 00:49:26 #include <string> #include "net/proxy/proxy_serve
tbansal1 2015/02/04 22:49:11 Done.
context_storage_.set_proxy_service(net::ProxyService::CreateFixed(proxy));
set_network_delegate(delegate);
}
@@ -187,9 +187,11 @@ class DataReductionProxyInterceptorWithServerTest : public testing::Test {
TestDataReductionProxyParams::HAS_EVERYTHING &
~TestDataReductionProxyParams::HAS_DEV_ORIGIN &
~TestDataReductionProxyParams::HAS_DEV_FALLBACK_ORIGIN));
- params->set_origin(proxy_.GetURL("/"));
- std::string proxy_name =
- net::HostPortPair::FromURL(GURL(params->origin())).ToString();
+ std::string spec = proxy_.GetURL("/").spec();
bengr 2015/02/04 00:49:26 This seems wrong, but I'm not sure what you're try
tbansal1 2015/02/04 22:49:11 proxy_ is EmbeddedTestServer. So, I have to call G
bengr 2015/02/05 00:31:07 Use base::TrimString
tbansal1 2015/02/05 01:54:09 Done.
+ params->set_origin(net::ProxyServer::FromURI(
+ spec.substr(0, spec.length()-1),
+ net::ProxyServer::SCHEME_HTTP));
+ std::string proxy_name = params->origin().ToURI();
proxy_service_.reset(
net::ProxyService::CreateFixedFromPacResult(
"PROXY " + proxy_name + "; DIRECT"));

Powered by Google App Engine
This is Rietveld 408576698